From 8caa77413ea372e5cbd2980a9922d701af359c04 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Wed, 28 May 2025 04:41:37 +0100 Subject: initial commit --- components.json | 21 + eslint.config.js | 28 + package.json | 86 + src/ViewContext.tsx | 43 + src/Widget.tsx | 61 + src/api/README.md | 45 + src/api/api.ts | 21 + src/api/apis/dashboard-api.ts | 134 ++ src/api/apis/leaderboard-api.ts | 301 +++ src/api/apis/offerwall-api.ts | 2205 ++++++++++++++++++++ src/api/apis/profiling-questions-api.ts | 504 +++++ src/api/apis/report-api.ts | 144 ++ src/api/apis/status-api.ts | 274 +++ src/api/apis/wallet-api.ts | 774 +++++++ src/api/base.ts | 70 + src/api/configuration.ts | 83 + src/api/git_push.sh | 52 + src/api/index.ts | 18 + src/api/models/amt-cashout-method-data.ts | 28 + ...oduct-id-offerwall37d1da64-offerwall-id-post.ts | 28 + ...uestions-product-id-profiling-questions-post.ts | 28 + src/api/models/bucket-task.ts | 60 + src/api/models/cardinality.ts | 24 + src/api/models/cash-mail-cashout-method-data.ts | 36 + .../cashout-method-foreign-value-response.ts | 45 + src/api/models/cashout-method-foreign-value.ts | 46 + src/api/models/cashout-method-out.ts | 122 ++ src/api/models/cashout-method-response.ts | 45 + src/api/models/cashout-methods-response.ts | 44 + src/api/models/cashout-request-info.ts | 58 + src/api/models/cashout-request-response.ts | 45 + src/api/models/category-association.ts | 58 + src/api/models/category.ts | 52 + src/api/models/count-stat.ts | 38 + .../create-cash-mail-cashout-method-request.ts | 44 + src/api/models/create-cashout-request.ts | 46 + .../create-pay-pal-cashout-method-request.ts | 44 + src/api/models/duration-summary.ts | 70 + src/api/models/httpvalidation-error.ts | 28 + src/api/models/index.ts | 119 ++ src/api/models/leaderboard-code.ts | 25 + src/api/models/leaderboard-frequency.ts | 25 + src/api/models/leaderboard-response.ts | 45 + src/api/models/leaderboard-row.ts | 46 + src/api/models/leaderboard-winner-response.ts | 44 + src/api/models/leaderboard-winner.ts | 108 + src/api/models/leaderboard.ts | 170 ++ src/api/models/market-profile-knowledge.ts | 50 + src/api/models/marketplace-bucket.ts | 104 + src/api/models/marketplace-inventory-summary.ts | 78 + src/api/models/marketplace-offerwall-response.ts | 36 + src/api/models/marketplace-offerwall.ts | 44 + src/api/models/marketplace-summary.ts | 38 + src/api/models/offer-wall-info.ts | 28 + src/api/models/one-shot-offerwall-bucket.ts | 54 + src/api/models/one-shot-offerwall-response.ts | 36 + src/api/models/one-shot-offerwall.ts | 44 + src/api/models/pattern-validation.ts | 38 + src/api/models/payout-status.ts | 28 + src/api/models/payout-summary.ts | 70 + src/api/models/payout-type.ts | 31 + src/api/models/paypal-cashout-method-data.ts | 36 + src/api/models/profiling-info-response.ts | 44 + src/api/models/property-type.ts | 25 + src/api/models/question-info.ts | 76 + src/api/models/question-option.ts | 34 + src/api/models/redemption-currency.ts | 32 + src/api/models/report-task.ts | 44 + src/api/models/report-value.ts | 30 + src/api/models/session-adjusted-status.ts | 25 + src/api/models/session-status-code2.ts | 35 + src/api/models/single-entry-bucket.ts | 38 + src/api/models/single-entry-offer-wall-response.ts | 36 + src/api/models/single-entry-offer-wall.ts | 52 + src/api/models/soft-pair-bucket.ts | 78 + src/api/models/soft-pair-offerwall-response.ts | 36 + src/api/models/soft-pair-offerwall.ts | 50 + src/api/models/source.ts | 43 + src/api/models/starwall-offer-wall-response.ts | 36 + src/api/models/starwall-offer-wall.ts | 52 + .../starwall-plus-block-offer-wall-response.ts | 36 + src/api/models/starwall-plus-block-offer-wall.ts | 44 + ...all-plus-block-recontact-offer-wall-response.ts | 36 + .../starwall-plus-block-recontact-offer-wall.ts | 44 + .../models/starwall-plus-offer-wall-response.ts | 36 + src/api/models/starwall-plus-offer-wall.ts | 44 + src/api/models/statistical-summary-stat.ts | 38 + src/api/models/statistical-summary-value.ts | 72 + src/api/models/status-code1.ts | 41 + src/api/models/status-info-response-fail.ts | 37 + src/api/models/status-response-failure.ts | 38 + src/api/models/status-response.ts | 38 + src/api/models/status-success-fail.ts | 30 + src/api/models/tango-cashout-method-data.ts | 48 + src/api/models/task-status-response-out.ts | 186 ++ src/api/models/tasks-status-response-out.ts | 28 + src/api/models/top-nbucket.ts | 98 + src/api/models/top-noffer-wall-response.ts | 36 + src/api/models/top-noffer-wall.ts | 52 + .../models/top-nplus-block-offer-wall-response.ts | 36 + src/api/models/top-nplus-block-offer-wall.ts | 44 + ...op-nplus-block-recontact-offer-wall-response.ts | 36 + .../models/top-nplus-block-recontact-offer-wall.ts | 44 + src/api/models/top-nplus-bucket.ts | 110 + src/api/models/top-nplus-offer-wall-response.ts | 36 + src/api/models/top-nplus-offer-wall.ts | 44 + src/api/models/top-nplus-recontact-bucket.ts | 116 + src/api/models/upk-question-choice-out.ts | 58 + src/api/models/upk-question-choice.ts | 64 + src/api/models/upk-question-configuration-mc.ts | 28 + .../models/upk-question-configuration-slider.ts | 46 + src/api/models/upk-question-configuration-te.ts | 38 + src/api/models/upk-question-out.ts | 109 + src/api/models/upk-question-response.ts | 68 + src/api/models/upk-question-selector-hidden.ts | 23 + src/api/models/upk-question-selector-mc.ts | 27 + src/api/models/upk-question-selector-slider.ts | 24 + src/api/models/upk-question-selector-te.ts | 25 + src/api/models/upk-question-type.ts | 26 + src/api/models/upk-question-validation.ts | 28 + src/api/models/upk-question.ts | 93 + src/api/models/upkimportance.ts | 38 + src/api/models/usdelivery-address.ts | 70 + src/api/models/user-info-response.ts | 45 + src/api/models/user-info.ts | 34 + src/api/models/user-profile-knowledge-answer.ts | 46 + src/api/models/user-profile-knowledge.ts | 54 + src/api/models/user-question-answer-in.ts | 36 + .../models/user-transaction-history-response.ts | 44 + src/api/models/user-transaction-row.ts | 90 + src/api/models/user-wallet-balance-response.ts | 45 + src/api/models/user-wallet-balance.ts | 62 + src/api/models/user-wallet-config.ts | 52 + src/api/models/user-wallet-transaction-type.ts | 26 + src/api/models/validation-error.ts | 40 + src/api/models/wxetofferwall-bucket.ts | 54 + src/api/models/wxetofferwall-response.ts | 36 + src/api/models/wxetofferwall.ts | 44 + src/api/package.json | 27 + src/api/tsconfig.json | 21 + src/components/app-sidebar.tsx | 158 ++ src/components/nav-main.tsx | 52 + src/components/site-header.tsx | 24 + src/components/ui/accordion.tsx | 64 + src/components/ui/alert-dialog.tsx | 157 ++ src/components/ui/alert.tsx | 66 + src/components/ui/aspect-ratio.tsx | 9 + src/components/ui/avatar.tsx | 53 + src/components/ui/badge.tsx | 46 + src/components/ui/breadcrumb.tsx | 109 + src/components/ui/button.tsx | 59 + src/components/ui/calendar.tsx | 73 + src/components/ui/card.tsx | 92 + src/components/ui/carousel.tsx | 241 +++ src/components/ui/chart.tsx | 351 ++++ src/components/ui/checkbox.tsx | 32 + src/components/ui/collapsible.tsx | 31 + src/components/ui/command.tsx | 177 ++ src/components/ui/context-menu.tsx | 252 +++ src/components/ui/dialog.tsx | 133 ++ src/components/ui/drawer.tsx | 130 ++ src/components/ui/dropdown-menu.tsx | 257 +++ src/components/ui/form.tsx | 165 ++ src/components/ui/hover-card.tsx | 42 + src/components/ui/input-otp.tsx | 77 + src/components/ui/input.tsx | 21 + src/components/ui/label.tsx | 24 + src/components/ui/menubar.tsx | 274 +++ src/components/ui/navigation-menu.tsx | 168 ++ src/components/ui/pagination.tsx | 127 ++ src/components/ui/popover.tsx | 48 + src/components/ui/progress.tsx | 29 + src/components/ui/radio-group.tsx | 45 + src/components/ui/resizable.tsx | 54 + src/components/ui/scroll-area.tsx | 58 + src/components/ui/select.tsx | 183 ++ src/components/ui/separator.tsx | 28 + src/components/ui/sheet.tsx | 137 ++ src/components/ui/sidebar.tsx | 727 +++++++ src/components/ui/skeleton.tsx | 13 + src/components/ui/slider.tsx | 63 + src/components/ui/sonner.tsx | 23 + src/components/ui/switch.tsx | 31 + src/components/ui/table.tsx | 114 + src/components/ui/tabs.tsx | 66 + src/components/ui/textarea.tsx | 18 + src/components/ui/toggle-group.tsx | 73 + src/components/ui/toggle.tsx | 45 + src/components/ui/tooltip.tsx | 59 + src/counterSlice.ts | 44 + src/hooks.ts | 7 + src/hooks/use-mobile.ts | 19 + src/index.css | 145 ++ src/lib/utils.ts | 6 + src/main.tsx | 52 + src/models/CashoutMethod.ts | 33 + src/models/app.ts | 13 + src/models/appSlice.ts | 23 + src/models/bucket.ts | 32 + src/models/bucketSlice.ts | 34 + src/models/question.ts | 272 +++ src/models/questionSlice.ts | 36 + src/pages/CashoutMethods.tsx | 48 + src/pages/Community.tsx | 50 + src/pages/Offerwall.tsx | 101 + src/pages/Questions.tsx | 105 + src/pages/Support.tsx | 38 + src/store.ts | 28 + src/types.ts | 74 + tsconfig.json | 13 + tsconfig.node.json | 24 + vite.config.mts | 70 + 212 files changed, 17430 insertions(+) create mode 100644 components.json create mode 100644 eslint.config.js create mode 100644 package.json create mode 100644 src/ViewContext.tsx create mode 100644 src/Widget.tsx create mode 100644 src/api/README.md create mode 100644 src/api/api.ts create mode 100644 src/api/apis/dashboard-api.ts create mode 100644 src/api/apis/leaderboard-api.ts create mode 100644 src/api/apis/offerwall-api.ts create mode 100644 src/api/apis/profiling-questions-api.ts create mode 100644 src/api/apis/report-api.ts create mode 100644 src/api/apis/status-api.ts create mode 100644 src/api/apis/wallet-api.ts create mode 100644 src/api/base.ts create mode 100644 src/api/configuration.ts create mode 100644 src/api/git_push.sh create mode 100644 src/api/index.ts create mode 100644 src/api/models/amt-cashout-method-data.ts create mode 100644 src/api/models/body-offerwall-softpair-post-product-id-offerwall37d1da64-offerwall-id-post.ts create mode 100644 src/api/models/body-submit-profiling-questions-product-id-profiling-questions-post.ts create mode 100644 src/api/models/bucket-task.ts create mode 100644 src/api/models/cardinality.ts create mode 100644 src/api/models/cash-mail-cashout-method-data.ts create mode 100644 src/api/models/cashout-method-foreign-value-response.ts create mode 100644 src/api/models/cashout-method-foreign-value.ts create mode 100644 src/api/models/cashout-method-out.ts create mode 100644 src/api/models/cashout-method-response.ts create mode 100644 src/api/models/cashout-methods-response.ts create mode 100644 src/api/models/cashout-request-info.ts create mode 100644 src/api/models/cashout-request-response.ts create mode 100644 src/api/models/category-association.ts create mode 100644 src/api/models/category.ts create mode 100644 src/api/models/count-stat.ts create mode 100644 src/api/models/create-cash-mail-cashout-method-request.ts create mode 100644 src/api/models/create-cashout-request.ts create mode 100644 src/api/models/create-pay-pal-cashout-method-request.ts create mode 100644 src/api/models/duration-summary.ts create mode 100644 src/api/models/httpvalidation-error.ts create mode 100644 src/api/models/index.ts create mode 100644 src/api/models/leaderboard-code.ts create mode 100644 src/api/models/leaderboard-frequency.ts create mode 100644 src/api/models/leaderboard-response.ts create mode 100644 src/api/models/leaderboard-row.ts create mode 100644 src/api/models/leaderboard-winner-response.ts create mode 100644 src/api/models/leaderboard-winner.ts create mode 100644 src/api/models/leaderboard.ts create mode 100644 src/api/models/market-profile-knowledge.ts create mode 100644 src/api/models/marketplace-bucket.ts create mode 100644 src/api/models/marketplace-inventory-summary.ts create mode 100644 src/api/models/marketplace-offerwall-response.ts create mode 100644 src/api/models/marketplace-offerwall.ts create mode 100644 src/api/models/marketplace-summary.ts create mode 100644 src/api/models/offer-wall-info.ts create mode 100644 src/api/models/one-shot-offerwall-bucket.ts create mode 100644 src/api/models/one-shot-offerwall-response.ts create mode 100644 src/api/models/one-shot-offerwall.ts create mode 100644 src/api/models/pattern-validation.ts create mode 100644 src/api/models/payout-status.ts create mode 100644 src/api/models/payout-summary.ts create mode 100644 src/api/models/payout-type.ts create mode 100644 src/api/models/paypal-cashout-method-data.ts create mode 100644 src/api/models/profiling-info-response.ts create mode 100644 src/api/models/property-type.ts create mode 100644 src/api/models/question-info.ts create mode 100644 src/api/models/question-option.ts create mode 100644 src/api/models/redemption-currency.ts create mode 100644 src/api/models/report-task.ts create mode 100644 src/api/models/report-value.ts create mode 100644 src/api/models/session-adjusted-status.ts create mode 100644 src/api/models/session-status-code2.ts create mode 100644 src/api/models/single-entry-bucket.ts create mode 100644 src/api/models/single-entry-offer-wall-response.ts create mode 100644 src/api/models/single-entry-offer-wall.ts create mode 100644 src/api/models/soft-pair-bucket.ts create mode 100644 src/api/models/soft-pair-offerwall-response.ts create mode 100644 src/api/models/soft-pair-offerwall.ts create mode 100644 src/api/models/source.ts create mode 100644 src/api/models/starwall-offer-wall-response.ts create mode 100644 src/api/models/starwall-offer-wall.ts create mode 100644 src/api/models/starwall-plus-block-offer-wall-response.ts create mode 100644 src/api/models/starwall-plus-block-offer-wall.ts create mode 100644 src/api/models/starwall-plus-block-recontact-offer-wall-response.ts create mode 100644 src/api/models/starwall-plus-block-recontact-offer-wall.ts create mode 100644 src/api/models/starwall-plus-offer-wall-response.ts create mode 100644 src/api/models/starwall-plus-offer-wall.ts create mode 100644 src/api/models/statistical-summary-stat.ts create mode 100644 src/api/models/statistical-summary-value.ts create mode 100644 src/api/models/status-code1.ts create mode 100644 src/api/models/status-info-response-fail.ts create mode 100644 src/api/models/status-response-failure.ts create mode 100644 src/api/models/status-response.ts create mode 100644 src/api/models/status-success-fail.ts create mode 100644 src/api/models/tango-cashout-method-data.ts create mode 100644 src/api/models/task-status-response-out.ts create mode 100644 src/api/models/tasks-status-response-out.ts create mode 100644 src/api/models/top-nbucket.ts create mode 100644 src/api/models/top-noffer-wall-response.ts create mode 100644 src/api/models/top-noffer-wall.ts create mode 100644 src/api/models/top-nplus-block-offer-wall-response.ts create mode 100644 src/api/models/top-nplus-block-offer-wall.ts create mode 100644 src/api/models/top-nplus-block-recontact-offer-wall-response.ts create mode 100644 src/api/models/top-nplus-block-recontact-offer-wall.ts create mode 100644 src/api/models/top-nplus-bucket.ts create mode 100644 src/api/models/top-nplus-offer-wall-response.ts create mode 100644 src/api/models/top-nplus-offer-wall.ts create mode 100644 src/api/models/top-nplus-recontact-bucket.ts create mode 100644 src/api/models/upk-question-choice-out.ts create mode 100644 src/api/models/upk-question-choice.ts create mode 100644 src/api/models/upk-question-configuration-mc.ts create mode 100644 src/api/models/upk-question-configuration-slider.ts create mode 100644 src/api/models/upk-question-configuration-te.ts create mode 100644 src/api/models/upk-question-out.ts create mode 100644 src/api/models/upk-question-response.ts create mode 100644 src/api/models/upk-question-selector-hidden.ts create mode 100644 src/api/models/upk-question-selector-mc.ts create mode 100644 src/api/models/upk-question-selector-slider.ts create mode 100644 src/api/models/upk-question-selector-te.ts create mode 100644 src/api/models/upk-question-type.ts create mode 100644 src/api/models/upk-question-validation.ts create mode 100644 src/api/models/upk-question.ts create mode 100644 src/api/models/upkimportance.ts create mode 100644 src/api/models/usdelivery-address.ts create mode 100644 src/api/models/user-info-response.ts create mode 100644 src/api/models/user-info.ts create mode 100644 src/api/models/user-profile-knowledge-answer.ts create mode 100644 src/api/models/user-profile-knowledge.ts create mode 100644 src/api/models/user-question-answer-in.ts create mode 100644 src/api/models/user-transaction-history-response.ts create mode 100644 src/api/models/user-transaction-row.ts create mode 100644 src/api/models/user-wallet-balance-response.ts create mode 100644 src/api/models/user-wallet-balance.ts create mode 100644 src/api/models/user-wallet-config.ts create mode 100644 src/api/models/user-wallet-transaction-type.ts create mode 100644 src/api/models/validation-error.ts create mode 100644 src/api/models/wxetofferwall-bucket.ts create mode 100644 src/api/models/wxetofferwall-response.ts create mode 100644 src/api/models/wxetofferwall.ts create mode 100644 src/api/package.json create mode 100644 src/api/tsconfig.json create mode 100644 src/components/app-sidebar.tsx create mode 100644 src/components/nav-main.tsx create mode 100644 src/components/site-header.tsx create mode 100644 src/components/ui/accordion.tsx create mode 100644 src/components/ui/alert-dialog.tsx create mode 100644 src/components/ui/alert.tsx create mode 100644 src/components/ui/aspect-ratio.tsx create mode 100644 src/components/ui/avatar.tsx create mode 100644 src/components/ui/badge.tsx create mode 100644 src/components/ui/breadcrumb.tsx create mode 100644 src/components/ui/button.tsx create mode 100644 src/components/ui/calendar.tsx create mode 100644 src/components/ui/card.tsx create mode 100644 src/components/ui/carousel.tsx create mode 100644 src/components/ui/chart.tsx create mode 100644 src/components/ui/checkbox.tsx create mode 100644 src/components/ui/collapsible.tsx create mode 100644 src/components/ui/command.tsx create mode 100644 src/components/ui/context-menu.tsx create mode 100644 src/components/ui/dialog.tsx create mode 100644 src/components/ui/drawer.tsx create mode 100644 src/components/ui/dropdown-menu.tsx create mode 100644 src/components/ui/form.tsx create mode 100644 src/components/ui/hover-card.tsx create mode 100644 src/components/ui/input-otp.tsx create mode 100644 src/components/ui/input.tsx create mode 100644 src/components/ui/label.tsx create mode 100644 src/components/ui/menubar.tsx create mode 100644 src/components/ui/navigation-menu.tsx create mode 100644 src/components/ui/pagination.tsx create mode 100644 src/components/ui/popover.tsx create mode 100644 src/components/ui/progress.tsx create mode 100644 src/components/ui/radio-group.tsx create mode 100644 src/components/ui/resizable.tsx create mode 100644 src/components/ui/scroll-area.tsx create mode 100644 src/components/ui/select.tsx create mode 100644 src/components/ui/separator.tsx create mode 100644 src/components/ui/sheet.tsx create mode 100644 src/components/ui/sidebar.tsx create mode 100644 src/components/ui/skeleton.tsx create mode 100644 src/components/ui/slider.tsx create mode 100644 src/components/ui/sonner.tsx create mode 100644 src/components/ui/switch.tsx create mode 100644 src/components/ui/table.tsx create mode 100644 src/components/ui/tabs.tsx create mode 100644 src/components/ui/textarea.tsx create mode 100644 src/components/ui/toggle-group.tsx create mode 100644 src/components/ui/toggle.tsx create mode 100644 src/components/ui/tooltip.tsx create mode 100644 src/counterSlice.ts create mode 100644 src/hooks.ts create mode 100644 src/hooks/use-mobile.ts create mode 100644 src/index.css create mode 100644 src/lib/utils.ts create mode 100644 src/main.tsx create mode 100644 src/models/CashoutMethod.ts create mode 100644 src/models/app.ts create mode 100644 src/models/appSlice.ts create mode 100644 src/models/bucket.ts create mode 100644 src/models/bucketSlice.ts create mode 100644 src/models/question.ts create mode 100644 src/models/questionSlice.ts create mode 100644 src/pages/CashoutMethods.tsx create mode 100644 src/pages/Community.tsx create mode 100644 src/pages/Offerwall.tsx create mode 100644 src/pages/Questions.tsx create mode 100644 src/pages/Support.tsx create mode 100644 src/store.ts create mode 100644 src/types.ts create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.mts diff --git a/components.json b/components.json new file mode 100644 index 0000000..73afbdb --- /dev/null +++ b/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/index.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..092408a --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +) diff --git a/package.json b/package.json new file mode 100644 index 0000000..424f396 --- /dev/null +++ b/package.json @@ -0,0 +1,86 @@ +{ + "name": "grl-snippet", + "private": true, + "version": "0.0.1", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "@emotion/react": "^11.14.0", + "@emotion/styled": "^11.14.0", + "@fontsource/roboto": "^5.2.5", + "@hookform/resolvers": "^5.0.1", + "@mui/material": "^7.0.2", + "@radix-ui/react-accordion": "^1.2.8", + "@radix-ui/react-alert-dialog": "^1.1.11", + "@radix-ui/react-aspect-ratio": "^1.1.4", + "@radix-ui/react-avatar": "^1.1.7", + "@radix-ui/react-checkbox": "^1.2.3", + "@radix-ui/react-collapsible": "^1.1.8", + "@radix-ui/react-context-menu": "^2.2.12", + "@radix-ui/react-dialog": "^1.1.11", + "@radix-ui/react-dropdown-menu": "^2.1.12", + "@radix-ui/react-hover-card": "^1.1.11", + "@radix-ui/react-label": "^2.1.4", + "@radix-ui/react-menubar": "^1.1.12", + "@radix-ui/react-navigation-menu": "^1.2.10", + "@radix-ui/react-popover": "^1.1.11", + "@radix-ui/react-progress": "^1.1.4", + "@radix-ui/react-radio-group": "^1.3.4", + "@radix-ui/react-scroll-area": "^1.2.6", + "@radix-ui/react-select": "^2.2.2", + "@radix-ui/react-separator": "^1.1.4", + "@radix-ui/react-slider": "^1.3.2", + "@radix-ui/react-slot": "^1.2.0", + "@radix-ui/react-switch": "^1.2.2", + "@radix-ui/react-tabs": "^1.1.9", + "@radix-ui/react-toggle": "^1.1.6", + "@radix-ui/react-toggle-group": "^1.1.7", + "@radix-ui/react-tooltip": "^1.2.4", + "@reduxjs/toolkit": "^2.8.2", + "@tailwindcss/vite": "^4.1.4", + "@toolpad/core": "^0.14.0", + "axios": "^1.8.4", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "^1.1.1", + "date-fns": "^3.6.0", + "embla-carousel-react": "^8.6.0", + "input-otp": "^1.4.2", + "lucide-react": "^0.503.0", + "motion": "^12.12.1", + "next-themes": "^0.4.6", + "querystring": "^0.2.1", + "react": "^18.3.1", + "react-day-picker": "^8.10.1", + "react-dom": "^18.3.1", + "react-hook-form": "^7.56.1", + "react-redux": "^9.2.0", + "react-resizable-panels": "^2.1.8", + "recharts": "^2.15.3", + "sonner": "^2.0.3", + "tailwind-merge": "^3.2.0", + "tailwindcss": "^4.1.4", + "tw-animate-css": "^1.2.8", + "vaul": "^1.1.2", + "zod": "^3.24.3" + }, + "devDependencies": { + "@eslint/js": "^9.17.0", + "@types/node": "^22.14.1", + "@types/react": "^18.3.20", + "@types/react-dom": "^18.3.6", + "@vitejs/plugin-react": "^4.4.1", + "eslint": "^9.25.1", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.20", + "globals": "^15.15.0", + "typescript": "~5.6.2", + "typescript-eslint": "^8.31.0", + "vite": "^6.3.2", + "vite-plugin-singlefile": "^2.2.0" + } +} diff --git a/src/ViewContext.tsx b/src/ViewContext.tsx new file mode 100644 index 0000000..7946052 --- /dev/null +++ b/src/ViewContext.tsx @@ -0,0 +1,43 @@ +// import { createContext, useContext, useState, ReactNode } from 'react'; +// import {ProfilingQuestion} from "@/models/question.ts" +// +// type View = 'offerwall' | 'questions' | 'cashout'; +// +// type ViewContextType = { +// activeView: View; +// setActiveView: (view: View) => void; +// }; +// +// type ProfilingQuestionMap = Map; +// +// interface ProfilingQuestionsContextType { +// answers: ProfilingQuestionMap; +// setAnswer: (questionId: string, values: string[]) => void; +// clearAnswers: () => void; +// } +// +// interface ProfilingQuestionsContextType { +// questions: ProfilingQuestion[]; +// setQuestions: (questions: ProfilingQuestion[]) => void; +// getQuestionById: (id: string) => ProfilingQuestion | undefined; +// } +// +// const ViewContext = createContext(undefined); +// +// export function useViewContext() { +// const context = useContext(ViewContext); +// if (!context) { +// throw new Error('useViewContext must be used within a ViewProvider'); +// } +// return context; +// } +// +// export function ViewProvider({ children }: { children: ReactNode }) { +// const [activeView, setActiveView] = useState('offerwall'); +// +// return ( +// +// {children} +// +// ); +// } \ No newline at end of file diff --git a/src/Widget.tsx b/src/Widget.tsx new file mode 100644 index 0000000..99c2a33 --- /dev/null +++ b/src/Widget.tsx @@ -0,0 +1,61 @@ +import React, {useEffect} from 'react' +import {AppSidebar} from "@/components/app-sidebar" +import {SiteHeader} from "@/components/site-header" +import {SidebarInset, SidebarProvider} from "@/components/ui/sidebar" +import {Offerwall} from "@/pages/Offerwall.tsx" +import {QuestionsPage} from "@/pages/Questions.tsx"; + +import {useAppDispatch, useAppSelector} from "@/hooks.ts"; +import {OfferwallApi, ProfilingQuestionsApi} from "@/api"; +import {setBuckets} from "@/models/bucketSlice.ts"; +import {setQuestions} from "@/models/questionSlice.ts" +import {CashoutMethodsPage} from "@/pages/CashoutMethods.tsx"; + +import './index.css'; + + +const Widget = () => { + + const dispatch = useAppDispatch() + const app = useAppSelector(state => state.app) + + useEffect(() => { + // https://fsb.generalresearch.com/{product_id}/offerwall/37d1da64/?country + new OfferwallApi().offerwallSoftpairProductIdOfferwall37d1da64Get(app.bpid, app.bpuid, "104.9.125.144") + .then(res => { + dispatch(setBuckets(res.data.offerwall.buckets)) + }) + .catch(err => console.log(err)); + + new ProfilingQuestionsApi().getProfilingQuestionsProductIdProfilingQuestionsGet(app.bpid, app.bpuid, "104.9.125.144") + .then(res => { + dispatch(setQuestions(res.data.questions)) + }) + .catch(err => console.log(err)); + }, []); // ← empty array means "run once" + + + return ( + + + + + +
+
+
+
+ {app.currentPage === 'offerwall' && } + {app.currentPage === 'questions' && } + {app.currentPage === 'cashouts' && } +
+
+
+
+ +
+
+ ) +} + +export {Widget} diff --git a/src/api/README.md b/src/api/README.md new file mode 100644 index 0000000..9fffca2 --- /dev/null +++ b/src/api/README.md @@ -0,0 +1,45 @@ +## @1.0.0 + +This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: + +Environment +* Node.js +* Webpack +* Browserify + +Language level +* ES5 - you must have a Promises/A+ library installed +* ES6 + +Module system +* CommonJS +* ES6 module system + +It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) + +### Building + +To build and compile the typescript sources to javascript use: +``` +npm install +npm run build +``` + +### Publishing + +First build the package then run ```npm publish``` + +### Consuming + +navigate to the folder of your consuming project and run one of the following commands. + +_published:_ + +``` +npm install @1.0.0 --save +``` + +_unPublished (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/src/api/api.ts b/src/api/api.ts new file mode 100644 index 0000000..f54d5ed --- /dev/null +++ b/src/api/api.ts @@ -0,0 +1,21 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +export * from './apis/dashboard-api'; +export * from './apis/leaderboard-api'; +export * from './apis/offerwall-api'; +export * from './apis/profiling-questions-api'; +export * from './apis/report-api'; +export * from './apis/status-api'; +export * from './apis/wallet-api'; + diff --git a/src/api/apis/dashboard-api.ts b/src/api/apis/dashboard-api.ts new file mode 100644 index 0000000..f35213a --- /dev/null +++ b/src/api/apis/dashboard-api.ts @@ -0,0 +1,134 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { HTTPValidationError } from '../models'; +import { MarketplaceSummary } from '../models'; +/** + * DashboardApi - axios parameter creator + * @export + */ +export const DashboardApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Marketplace Inventory + * @param {any} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceInventoryDashboardInventoryGet: async (marketplace: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'marketplace' is not null or undefined + if (marketplace === null || marketplace === undefined) { + throw new RequiredError('marketplace','Required parameter marketplace was null or undefined when calling marketplaceInventoryDashboardInventoryGet.'); + } + const localVarPath = `/dashboard/inventory/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (marketplace !== undefined) { + localVarQueryParameter['marketplace'] = marketplace; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DashboardApi - functional programming interface + * @export + */ +export const DashboardApiFp = function(configuration?: Configuration) { + return { + /** + * + * @summary Marketplace Inventory + * @param {any} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceInventoryDashboardInventoryGet(marketplace: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await DashboardApiAxiosParamCreator(configuration).marketplaceInventoryDashboardInventoryGet(marketplace, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * DashboardApi - factory interface + * @export + */ +export const DashboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * + * @summary Marketplace Inventory + * @param {any} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceInventoryDashboardInventoryGet(marketplace: any, options?: AxiosRequestConfig): Promise> { + return DashboardApiFp(configuration).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 {any} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApi + */ + public async marketplaceInventoryDashboardInventoryGet(marketplace: any, options?: AxiosRequestConfig) : Promise> { + return DashboardApiFp(this.configuration).marketplaceInventoryDashboardInventoryGet(marketplace, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/leaderboard-api.ts b/src/api/apis/leaderboard-api.ts new file mode 100644 index 0000000..26e8c95 --- /dev/null +++ b/src/api/apis/leaderboard-api.ts @@ -0,0 +1,301 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { HTTPValidationError } from '../models'; +import { LeaderboardResponse } from '../models'; +import { LeaderboardWinnerResponse } from '../models'; +/** + * LeaderboardApi - axios parameter creator + * @export + */ +export const LeaderboardApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet: async (productId: any, boardCode: any, freq: any, countryIso: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet.'); + } + // verify required parameter 'boardCode' is not null or undefined + if (boardCode === null || boardCode === undefined) { + throw new RequiredError('boardCode','Required parameter boardCode was null or undefined when calling leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet.'); + } + // verify required parameter 'freq' is not null or undefined + if (freq === null || freq === undefined) { + throw new RequiredError('freq','Required parameter freq was null or undefined when calling leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet.'); + } + // verify required parameter 'countryIso' is not null or undefined + if (countryIso === null || countryIso === undefined) { + throw new RequiredError('countryIso','Required parameter countryIso was null or undefined when calling leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Timespan Leaderboard + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [bpuid] Brokerage Product User ID. If passed, then the country is not required; the country is determined by this user's latest IP. + * @param {any} [timestamp] The start timestamp for the requested leaderboard. If NULL, uses the current time period. + * @param {any} [scope] If scope is \"user\", then `bp_user_id` must be set. Results in filtering rows to include only this user's row, plus rows above and below in rank (up to `limit` rows). If \"global\", then the top `limit` rows are returned. + * @param {any} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet: async (productId: any, boardCode: any, freq: any, countryIso?: any, bpuid?: any, timestamp?: any, scope?: any, limit?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet.'); + } + // verify required parameter 'boardCode' is not null or undefined + if (boardCode === null || boardCode === undefined) { + throw new RequiredError('boardCode','Required parameter boardCode was null or undefined when calling timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet.'); + } + // verify required parameter 'freq' is not null or undefined + if (freq === null || freq === undefined) { + throw new RequiredError('freq','Required parameter freq was null or undefined when calling timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 (timestamp !== undefined) { + localVarQueryParameter['timestamp'] = timestamp; + } + + if (scope !== undefined) { + localVarQueryParameter['scope'] = scope; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeaderboardApi - functional programming interface + * @export + */ +export const LeaderboardApiFp = function(configuration?: Configuration) { + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: any, boardCode: any, freq: any, countryIso: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await LeaderboardApiAxiosParamCreator(configuration).leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary Timespan Leaderboard + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [bpuid] Brokerage Product User ID. If passed, then the country is not required; the country is determined by this user's latest IP. + * @param {any} [timestamp] The start timestamp for the requested leaderboard. If NULL, uses the current time period. + * @param {any} [scope] If scope is \"user\", then `bp_user_id` must be set. Results in filtering rows to include only this user's row, plus rows above and below in rank (up to `limit` rows). If \"global\", then the top `limit` rows are returned. + * @param {any} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: any, boardCode: any, freq: any, countryIso?: any, bpuid?: any, timestamp?: any, scope?: any, limit?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await LeaderboardApiAxiosParamCreator(configuration).timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, timestamp, scope, limit, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * LeaderboardApi - factory interface + * @export + */ +export const LeaderboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: any, boardCode: any, freq: any, countryIso: any, options?: AxiosRequestConfig): Promise> { + return LeaderboardApiFp(configuration).leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Timespan Leaderboard + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [bpuid] Brokerage Product User ID. If passed, then the country is not required; the country is determined by this user's latest IP. + * @param {any} [timestamp] The start timestamp for the requested leaderboard. If NULL, uses the current time period. + * @param {any} [scope] If scope is \"user\", then `bp_user_id` must be set. Results in filtering rows to include only this user's row, plus rows above and below in rank (up to `limit` rows). If \"global\", then the top `limit` rows are returned. + * @param {any} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: any, boardCode: any, freq: any, countryIso?: any, bpuid?: any, timestamp?: any, scope?: any, limit?: any, options?: AxiosRequestConfig): Promise> { + return LeaderboardApiFp(configuration).timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, timestamp, scope, 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LeaderboardApi + */ + public async leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: any, boardCode: any, freq: any, countryIso: any, options?: AxiosRequestConfig) : Promise> { + return LeaderboardApiFp(this.configuration).leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary Timespan Leaderboard + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} 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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [bpuid] Brokerage Product User ID. If passed, then the country is not required; the country is determined by this user's latest IP. + * @param {any} [timestamp] The start timestamp for the requested leaderboard. If NULL, uses the current time period. + * @param {any} [scope] If scope is \"user\", then `bp_user_id` must be set. Results in filtering rows to include only this user's row, plus rows above and below in rank (up to `limit` rows). If \"global\", then the top `limit` rows are returned. + * @param {any} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LeaderboardApi + */ + public async timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: any, boardCode: any, freq: any, countryIso?: any, bpuid?: any, timestamp?: any, scope?: any, limit?: any, options?: AxiosRequestConfig) : Promise> { + return LeaderboardApiFp(this.configuration).timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, timestamp, scope, limit, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/offerwall-api.ts b/src/api/apis/offerwall-api.ts new file mode 100644 index 0000000..a49c613 --- /dev/null +++ b/src/api/apis/offerwall-api.ts @@ -0,0 +1,2205 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost } from '../models'; +import { HTTPValidationError } from '../models'; +import { MarketplaceOfferwallResponse } from '../models'; +import { OneShotOfferwallResponse } from '../models'; +import { SingleEntryOfferWallResponse } from '../models'; +import { SoftPairOfferwallResponse } from '../models'; +import { StarwallOfferWallResponse } from '../models'; +import { StarwallPlusBlockOfferWallResponse } from '../models'; +import { StarwallPlusBlockRecontactOfferWallResponse } from '../models'; +import { StarwallPlusOfferWallResponse } from '../models'; +import { TopNOfferWallResponse } from '../models'; +import { TopNPlusBlockOfferWallResponse } from '../models'; +import { TopNPlusBlockRecontactOfferWallResponse } from '../models'; +import { TopNPlusOfferWallResponse } from '../models'; +import { WXETOfferwallResponse } from '../models'; +/** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceOfferwallProductIdOfferwall5fa23085Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling marketplaceOfferwallProductIdOfferwall5fa23085Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling marketplaceOfferwallProductIdOfferwall5fa23085Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} offerwallId The offerwall ID the user is interacting with + * @param {any} sessionId A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: async (body: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, bpuid: any, productId: any, offerwallId: any, sessionId: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost.'); + } + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost.'); + } + // verify required parameter 'offerwallId' is not null or undefined + if (offerwallId === null || offerwallId === undefined) { + throw new RequiredError('offerwallId','Required parameter offerwallId was null or undefined when calling offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost.'); + } + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new RequiredError('sessionId','Required parameter sessionId was null or undefined when calling offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost.'); + } + const localVarPath = `/{product_id}/offerwall/37d1da64/{offerwall_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"offerwall_id"}}`, encodeURIComponent(String(offerwallId))) + .replace(`{${"session_id"}}`, encodeURIComponent(String(sessionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {any} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairProductIdOfferwall37d1da64Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, maxOptions?: any, maxQuestions?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling offerwallSoftpairProductIdOfferwall37d1da64Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling offerwallSoftpairProductIdOfferwall37d1da64Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oneShotOfferwallProductIdOfferwall6f27b1aeGet: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, sources?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling oneShotOfferwallProductIdOfferwall6f27b1aeGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling oneShotOfferwallProductIdOfferwall6f27b1aeGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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 !== undefined) { + localVarQueryParameter['sources'] = sources; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + singleOfferwallProductIdOfferwall5fl8bpv5Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling singleOfferwallProductIdOfferwall5fl8bpv5Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling singleOfferwallProductIdOfferwall5fl8bpv5Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallOfferwallProductIdOfferwallB59a2d2bGet: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling starwallOfferwallProductIdOfferwallB59a2d2bGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling starwallOfferwallProductIdOfferwallB59a2d2bGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusOfferwallProductIdOfferwall5481f322Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling starwallPlusOfferwallProductIdOfferwall5481f322Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling starwallPlusOfferwallProductIdOfferwall5481f322Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNOfferwallProductIdOfferwall45b7228a7Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling topNOfferwallProductIdOfferwall45b7228a7Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling topNOfferwallProductIdOfferwall45b7228a7Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockOfferwallProductIdOfferwallD48cce47Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling topNPlusBlockOfferwallProductIdOfferwallD48cce47Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling topNPlusBlockOfferwallProductIdOfferwallD48cce47Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusOfferwallProductIdOfferwallB145b803Get: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling topNPlusOfferwallProductIdOfferwallB145b803Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling topNPlusOfferwallProductIdOfferwallB145b803Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling wXETOfferwallProductIdOfferwall55a4e1a9Get.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling wXETOfferwallProductIdOfferwall55a4e1a9Get.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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 !== undefined) { + 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OfferwallApi - functional programming interface + * @export + */ +export const OfferwallApiFp = function(configuration?: Configuration) { + return { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).marketplaceOfferwallProductIdOfferwall5fa23085Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} offerwallId The offerwall ID the user is interacting with + * @param {any} sessionId A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, bpuid: any, productId: any, offerwallId: any, sessionId: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body, bpuid, productId, offerwallId, sessionId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {any} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairProductIdOfferwall37d1da64Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, maxOptions?: any, maxQuestions?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).offerwallSoftpairProductIdOfferwall37d1da64Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, sources?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, sources, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).singleOfferwallProductIdOfferwall5fl8bpv5Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).starwallOfferwallProductIdOfferwallB59a2d2bGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).starwallPlusOfferwallProductIdOfferwall5481f322Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNOfferwallProductIdOfferwall45b7228a7Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).topNOfferwallProductIdOfferwall45b7228a7Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusOfferwallProductIdOfferwallB145b803Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).topNPlusOfferwallProductIdOfferwallB145b803Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OfferwallApiAxiosParamCreator(configuration).wXETOfferwallProductIdOfferwall55a4e1a9Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * OfferwallApi - factory interface + * @export + */ +export const OfferwallApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 Post + * @param {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} offerwallId The offerwall ID the user is interacting with + * @param {any} sessionId A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, bpuid: any, productId: any, offerwallId: any, sessionId: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body, bpuid, productId, offerwallId, 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {any} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairProductIdOfferwall37d1da64Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, maxOptions?: any, maxQuestions?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, sources?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNOfferwallProductIdOfferwall45b7228a7Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusOfferwallProductIdOfferwallB145b803Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, options?: AxiosRequestConfig): Promise> { + return OfferwallApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig) : Promise> { + 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 Post + * @param {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} offerwallId The offerwall ID the user is interacting with + * @param {any} sessionId A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, bpuid: any, productId: any, offerwallId: any, sessionId: any, options?: AxiosRequestConfig) : Promise> { + return OfferwallApiFp(this.configuration).offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(body, bpuid, productId, offerwallId, 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {any} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async offerwallSoftpairProductIdOfferwall37d1da64Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, maxOptions?: any, maxQuestions?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, sources?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, minBinSize?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async topNOfferwallProductIdOfferwall45b7228a7Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 {any} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {any} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public async topNPlusOfferwallProductIdOfferwallB145b803Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, minBinSize?: any, splitBy?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languages] Respondent's desired languages (ISO 639-2/B, lowercase) + * @param {any} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {any} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {any} [duration] Maximum length of desired task (in seconds). + * @param {any} [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 async wXETOfferwallProductIdOfferwall55a4e1a9Get(productId: any, bpuid: any, ip?: any, countryIso?: any, languages?: any, behavior?: any, minPayout?: any, duration?: any, nBins?: any, options?: AxiosRequestConfig) : Promise> { + return OfferwallApiFp(this.configuration).wXETOfferwallProductIdOfferwall55a4e1a9Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/profiling-questions-api.ts b/src/api/apis/profiling-questions-api.ts new file mode 100644 index 0000000..cdcdb85 --- /dev/null +++ b/src/api/apis/profiling-questions-api.ts @@ -0,0 +1,504 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost } from '../models'; +import { HTTPValidationError } from '../models'; +import { ProfilingInfoResponse } from '../models'; +import { StatusResponse } from '../models'; +import { UpkQuestionResponse } from '../models'; +import { UserInfoResponse } from '../models'; +/** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {any} [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 {any} [isGrs] If it's the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProfilingQuestionsProductIdProfilingQuestionsGet: async (productId: any, bpuid: any, ip?: any, countryIso?: any, languageIso?: any, limit?: any, isGrs?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getProfilingQuestionsProductIdProfilingQuestionsGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling getProfilingQuestionsProductIdProfilingQuestionsGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + profilingInfoProductIdProfilingInfoGet: async (productId: any, countryIso: any, languageIso?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling profilingInfoProductIdProfilingInfoGet.'); + } + // verify required parameter 'countryIso' is not null or undefined + if (countryIso === null || countryIso === undefined) { + throw new RequiredError('countryIso','Required parameter countryIso was null or undefined when calling profilingInfoProductIdProfilingInfoGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {any} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitProfilingQuestionsProductIdProfilingQuestionsPost: async (body: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, bpuid: any, productId: any, sessionId?: any, async?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling submitProfilingQuestionsProductIdProfilingQuestionsPost.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling submitProfilingQuestionsProductIdProfilingQuestionsPost.'); + } + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling submitProfilingQuestionsProductIdProfilingQuestionsPost.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary User Profile + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileProductIdUserProfileGet: async (productId: any, bpuid: any, countryIso: any, languageIso?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling userProfileProductIdUserProfileGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling userProfileProductIdUserProfileGet.'); + } + // verify required parameter 'countryIso' is not null or undefined + if (countryIso === null || countryIso === undefined) { + throw new RequiredError('countryIso','Required parameter countryIso was null or undefined when calling userProfileProductIdUserProfileGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { 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; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProfilingQuestionsApi - functional programming interface + * @export + */ +export const ProfilingQuestionsApiFp = 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {any} [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 {any} [isGrs] If it's the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProfilingQuestionsProductIdProfilingQuestionsGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languageIso?: any, limit?: any, isGrs?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await ProfilingQuestionsApiAxiosParamCreator(configuration).getProfilingQuestionsProductIdProfilingQuestionsGet(productId, bpuid, ip, countryIso, languageIso, limit, isGrs, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async profilingInfoProductIdProfilingInfoGet(productId: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await ProfilingQuestionsApiAxiosParamCreator(configuration).profilingInfoProductIdProfilingInfoGet(productId, countryIso, languageIso, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {any} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitProfilingQuestionsProductIdProfilingQuestionsPost(body: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, bpuid: any, productId: any, sessionId?: any, async?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await ProfilingQuestionsApiAxiosParamCreator(configuration).submitProfilingQuestionsProductIdProfilingQuestionsPost(body, bpuid, productId, sessionId, async, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary User Profile + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileProductIdUserProfileGet(productId: any, bpuid: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await ProfilingQuestionsApiAxiosParamCreator(configuration).userProfileProductIdUserProfileGet(productId, bpuid, countryIso, languageIso, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * ProfilingQuestionsApi - factory interface + * @export + */ +export const ProfilingQuestionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {any} [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 {any} [isGrs] If it's the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProfilingQuestionsProductIdProfilingQuestionsGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languageIso?: any, limit?: any, isGrs?: any, options?: AxiosRequestConfig): Promise> { + return ProfilingQuestionsApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async profilingInfoProductIdProfilingInfoGet(productId: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig): Promise> { + return ProfilingQuestionsApiFp(configuration).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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {any} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitProfilingQuestionsProductIdProfilingQuestionsPost(body: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, bpuid: any, productId: any, sessionId?: any, async?: any, options?: AxiosRequestConfig): Promise> { + return ProfilingQuestionsApiFp(configuration).submitProfilingQuestionsProductIdProfilingQuestionsPost(body, bpuid, productId, sessionId, async, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary User Profile + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileProductIdUserProfileGet(productId: any, bpuid: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig): Promise> { + return ProfilingQuestionsApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} [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 {any} [countryIso] Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {any} [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 {any} [isGrs] If it's the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public async getProfilingQuestionsProductIdProfilingQuestionsGet(productId: any, bpuid: any, ip?: any, countryIso?: any, languageIso?: any, limit?: any, isGrs?: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public async profilingInfoProductIdProfilingInfoGet(productId: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig) : Promise> { + 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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} body + * @param {any} 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {any} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public async submitProfilingQuestionsProductIdProfilingQuestionsPost(body: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, bpuid: any, productId: any, sessionId?: any, async?: any, options?: AxiosRequestConfig) : Promise> { + return ProfilingQuestionsApiFp(this.configuration).submitProfilingQuestionsProductIdProfilingQuestionsPost(body, bpuid, productId, sessionId, async, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary User Profile + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 {any} countryIso Respondent's country code (ISO 3166-1 alpha-2, lowercase) + * @param {any} [languageIso] Respondent's desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public async userProfileProductIdUserProfileGet(productId: any, bpuid: any, countryIso: any, languageIso?: any, options?: AxiosRequestConfig) : Promise> { + return ProfilingQuestionsApiFp(this.configuration).userProfileProductIdUserProfileGet(productId, bpuid, countryIso, languageIso, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/report-api.ts b/src/api/apis/report-api.ts new file mode 100644 index 0000000..d3f74b8 --- /dev/null +++ b/src/api/apis/report-api.ts @@ -0,0 +1,144 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { HTTPValidationError } from '../models'; +import { ReportTask } from '../models'; +import { StatusResponse } from '../models'; +/** + * 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 {ReportTask} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reportTaskProductIdReportPost: async (body: ReportTask, productId: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling reportTaskProductIdReportPost.'); + } + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling reportTaskProductIdReportPost.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReportApi - functional programming interface + * @export + */ +export const ReportApiFp = 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 {ReportTask} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reportTaskProductIdReportPost(body: ReportTask, productId: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await ReportApiAxiosParamCreator(configuration).reportTaskProductIdReportPost(body, productId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * ReportApi - factory interface + * @export + */ +export const ReportApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + 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 {ReportTask} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reportTaskProductIdReportPost(body: ReportTask, productId: any, options?: AxiosRequestConfig): Promise> { + return ReportApiFp(configuration).reportTaskProductIdReportPost(body, productId, 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 {ReportTask} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportApi + */ + public async reportTaskProductIdReportPost(body: ReportTask, productId: any, options?: AxiosRequestConfig) : Promise> { + return ReportApiFp(this.configuration).reportTaskProductIdReportPost(body, productId, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/status-api.ts b/src/api/apis/status-api.ts new file mode 100644 index 0000000..2a97ffe --- /dev/null +++ b/src/api/apis/status-api.ts @@ -0,0 +1,274 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { HTTPValidationError } from '../models'; +import { StatusInfoResponseFail } from '../models'; +import { StatusResponseFailure } from '../models'; +import { TaskStatusResponseOut } from '../models'; +import { TasksStatusResponseOut } from '../models'; +/** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTaskStatusProductIdStatusTsidGet: async (productId: any, tsid: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getTaskStatusProductIdStatusTsidGet.'); + } + // verify required parameter 'tsid' is not null or undefined + if (tsid === null || tsid === undefined) { + throw new RequiredError('tsid','Required parameter tsid was null or undefined when calling getTaskStatusProductIdStatusTsidGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Task Statuses + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [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 {any} [startedAfter] (unix timestamp) Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {any} [startedBefore] (unix timestamp) Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {any} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {any} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {any} [adjustedAfter] (unix timestamp) Retrieve sessions which were adjusted after this timestamp. + * @param {any} [adjustedBefore] (unix timestamp) Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTaskStatusesProductIdStatusGet: async (productId: any, bpuid?: any, startedAfter?: any, startedBefore?: any, status?: any, reconciled?: any, adjustedAfter?: any, adjustedBefore?: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling listTaskStatusesProductIdStatusGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (startedAfter !== undefined) { + localVarQueryParameter['started_after'] = startedAfter; + } + + if (startedBefore !== undefined) { + localVarQueryParameter['started_before'] = startedBefore; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (reconciled !== undefined) { + localVarQueryParameter['reconciled'] = reconciled; + } + + if (adjustedAfter !== undefined) { + localVarQueryParameter['adjusted_after'] = adjustedAfter; + } + + if (adjustedBefore !== undefined) { + localVarQueryParameter['adjusted_before'] = adjustedBefore; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * StatusApi - functional programming interface + * @export + */ +export const StatusApiFp = 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTaskStatusProductIdStatusTsidGet(productId: any, tsid: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await StatusApiAxiosParamCreator(configuration).getTaskStatusProductIdStatusTsidGet(productId, tsid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * + * @summary List Task Statuses + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [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 {any} [startedAfter] (unix timestamp) Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {any} [startedBefore] (unix timestamp) Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {any} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {any} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {any} [adjustedAfter] (unix timestamp) Retrieve sessions which were adjusted after this timestamp. + * @param {any} [adjustedBefore] (unix timestamp) Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTaskStatusesProductIdStatusGet(productId: any, bpuid?: any, startedAfter?: any, startedBefore?: any, status?: any, reconciled?: any, adjustedAfter?: any, adjustedBefore?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await StatusApiAxiosParamCreator(configuration).listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * StatusApi - factory interface + * @export + */ +export const StatusApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTaskStatusProductIdStatusTsidGet(productId: any, tsid: any, options?: AxiosRequestConfig): Promise> { + return StatusApiFp(configuration).getTaskStatusProductIdStatusTsidGet(productId, tsid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Task Statuses + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [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 {any} [startedAfter] (unix timestamp) Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {any} [startedBefore] (unix timestamp) Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {any} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {any} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {any} [adjustedAfter] (unix timestamp) Retrieve sessions which were adjusted after this timestamp. + * @param {any} [adjustedBefore] (unix timestamp) Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTaskStatusesProductIdStatusGet(productId: any, bpuid?: any, startedAfter?: any, startedBefore?: any, status?: any, reconciled?: any, adjustedAfter?: any, adjustedBefore?: any, options?: AxiosRequestConfig): Promise> { + return StatusApiFp(configuration).listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatusApi + */ + public async getTaskStatusProductIdStatusTsidGet(productId: any, tsid: any, options?: AxiosRequestConfig) : Promise> { + return StatusApiFp(this.configuration).getTaskStatusProductIdStatusTsidGet(productId, tsid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * + * @summary List Task Statuses + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} [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 {any} [startedAfter] (unix timestamp) Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {any} [startedBefore] (unix timestamp) Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {any} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {any} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {any} [adjustedAfter] (unix timestamp) Retrieve sessions which were adjusted after this timestamp. + * @param {any} [adjustedBefore] (unix timestamp) Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatusApi + */ + public async listTaskStatusesProductIdStatusGet(productId: any, bpuid?: any, startedAfter?: any, startedBefore?: any, status?: any, reconciled?: any, adjustedAfter?: any, adjustedBefore?: any, options?: AxiosRequestConfig) : Promise> { + return StatusApiFp(this.configuration).listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/apis/wallet-api.ts b/src/api/apis/wallet-api.ts new file mode 100644 index 0000000..37a8cee --- /dev/null +++ b/src/api/apis/wallet-api.ts @@ -0,0 +1,774 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { CashoutMethodForeignValueResponse } from '../models'; +import { CashoutMethodResponse } from '../models'; +import { CashoutMethodsResponse } from '../models'; +import { CashoutRequestResponse } from '../models'; +import { CreateCashoutRequest } from '../models'; +import { HTTPValidationError } from '../models'; +import { StatusResponse } from '../models'; +import { UserTransactionHistoryResponse } from '../models'; +import { UserWalletBalanceResponse } from '../models'; +/** + * 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 {any} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCashoutMethodProductIdCashoutMethodsPost: async (body: any, productId: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling createCashoutMethodProductIdCashoutMethodsPost.'); + } + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling createCashoutMethodProductIdCashoutMethodsPost.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method to delete + * @param {any} 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: any, cashoutMethodId: any, bpuid: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete.'); + } + // verify required parameter 'cashoutMethodId' is not null or undefined + if (cashoutMethodId === null || cashoutMethodId === undefined) { + throw new RequiredError('cashoutMethodId','Required parameter cashoutMethodId was null or undefined when calling deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutDetailProductIdCashoutCashoutIdGet: async (productId: any, cashoutId: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getCashoutDetailProductIdCashoutCashoutIdGet.'); + } + // verify required parameter 'cashoutId' is not null or undefined + if (cashoutId === null || cashoutId === undefined) { + throw new RequiredError('cashoutId','Required parameter cashoutId was null or undefined when calling getCashoutDetailProductIdCashoutCashoutIdGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the current available mechanisms that a user can use to retrieve funds. + * @summary Get Cashout Methods + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getCashoutMethodsProductIdCashoutMethodsGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling getCashoutMethodsProductIdCashoutMethodsGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method + * @param {any} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet: async (productId: any, cashoutMethodId: any, amount: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet.'); + } + // verify required parameter 'cashoutMethodId' is not null or undefined + if (cashoutMethodId === null || cashoutMethodId === undefined) { + throw new RequiredError('cashoutMethodId','Required parameter cashoutMethodId was null or undefined when calling getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet.'); + } + // verify required parameter 'amount' is not null or undefined + if (amount === null || amount === undefined) { + throw new RequiredError('amount','Required parameter amount was null or undefined when calling getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (amount !== undefined) { + localVarQueryParameter['amount'] = amount; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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} + */ + getUserTransactionHistoryProductIdTransactionHistoryGet: async (productId: any, bpuid: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getUserTransactionHistoryProductIdTransactionHistoryGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling getUserTransactionHistoryProductIdTransactionHistoryGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the current balance of a respondent's wallet balance for display + * @summary Get User Wallet Balance + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling getUserWalletBalanceProductIdWalletGet.'); + } + // verify required parameter 'bpuid' is not null or undefined + if (bpuid === null || bpuid === undefined) { + throw new RequiredError('bpuid','Required parameter bpuid was null or undefined when calling getUserWalletBalanceProductIdWalletGet.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + 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 {CreateCashoutRequest} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitUserCashoutProductIdCashoutPost: async (body: CreateCashoutRequest, productId: any, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling submitUserCashoutProductIdCashoutPost.'); + } + // verify required parameter 'productId' is not null or undefined + if (productId === null || productId === undefined) { + throw new RequiredError('productId','Required parameter productId was null or undefined when calling submitUserCashoutProductIdCashoutPost.'); + } + 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, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WalletApi - functional programming interface + * @export + */ +export const WalletApiFp = 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 {any} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCashoutMethodProductIdCashoutMethodsPost(body: any, productId: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).createCashoutMethodProductIdCashoutMethodsPost(body, productId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method to delete + * @param {any} 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: any, cashoutMethodId: any, bpuid: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCashoutDetailProductIdCashoutCashoutIdGet(productId: any, cashoutId: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).getCashoutDetailProductIdCashoutCashoutIdGet(productId, cashoutId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Retrieve the current available mechanisms that a user can use to retrieve funds. + * @summary Get Cashout Methods + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method + * @param {any} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: any, cashoutMethodId: any, amount: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId, cashoutMethodId, amount, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 getUserTransactionHistoryProductIdTransactionHistoryGet(productId: any, bpuid: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Retrieve the current balance of a respondent's wallet balance for display + * @summary Get User Wallet Balance + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).getUserWalletBalanceProductIdWalletGet(productId, bpuid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Request a cashout taken from a user's available wallet balance, to be paid via a particular cashout method. + * @summary Submit User Cashout + * @param {CreateCashoutRequest} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitUserCashoutProductIdCashoutPost(body: CreateCashoutRequest, productId: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await WalletApiAxiosParamCreator(configuration).submitUserCashoutProductIdCashoutPost(body, productId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * WalletApi - factory interface + * @export + */ +export const WalletApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + 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 {any} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCashoutMethodProductIdCashoutMethodsPost(body: any, productId: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).createCashoutMethodProductIdCashoutMethodsPost(body, productId, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method to delete + * @param {any} 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: any, cashoutMethodId: any, bpuid: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCashoutDetailProductIdCashoutCashoutIdGet(productId: any, cashoutId: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method + * @param {any} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: any, cashoutMethodId: any, amount: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 getUserTransactionHistoryProductIdTransactionHistoryGet(productId: any, bpuid: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the current balance of a respondent's wallet balance for display + * @summary Get User Wallet Balance + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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: any, bpuid: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).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 {CreateCashoutRequest} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitUserCashoutProductIdCashoutPost(body: CreateCashoutRequest, productId: any, options?: AxiosRequestConfig): Promise> { + return WalletApiFp(configuration).submitUserCashoutProductIdCashoutPost(body, productId, 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 {any} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public async createCashoutMethodProductIdCashoutMethodsPost(body: any, productId: any, options?: AxiosRequestConfig) : Promise> { + return WalletApiFp(this.configuration).createCashoutMethodProductIdCashoutMethodsPost(body, productId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method to delete + * @param {any} 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 async deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId: any, cashoutMethodId: any, bpuid: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public async getCashoutDetailProductIdCashoutCashoutIdGet(productId: any, cashoutId: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 async getCashoutMethodsProductIdCashoutMethodsGet(productId: any, bpuid: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} cashoutMethodId The ID of the cashout method + * @param {any} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public async getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: any, cashoutMethodId: any, amount: any, options?: AxiosRequestConfig) : Promise> { + 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 async getUserTransactionHistoryProductIdTransactionHistoryGet(productId: any, bpuid: any, options?: AxiosRequestConfig) : Promise> { + return WalletApiFp(this.configuration).getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, 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 {any} productId The Brokerage Product ID provided by GRL. + * @param {any} 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 async getUserWalletBalanceProductIdWalletGet(productId: any, bpuid: any, options?: AxiosRequestConfig) : Promise> { + 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 {CreateCashoutRequest} body + * @param {any} productId The Brokerage Product ID provided by GRL. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public async submitUserCashoutProductIdCashoutPost(body: CreateCashoutRequest, productId: any, options?: AxiosRequestConfig) : Promise> { + return WalletApiFp(this.configuration).submitUserCashoutProductIdCashoutPost(body, productId, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/base.ts b/src/api/base.ts new file mode 100644 index 0000000..b7b4ed1 --- /dev/null +++ b/src/api/base.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { Configuration } from "./configuration"; +// Some imports not used depending on template conditions +// @ts-ignore +import globalAxios, { AxiosRequestConfig, AxiosInstance } from 'axios'; + +export const BASE_PATH = "https://fsb.generalresearch.com/".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath || this.basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} diff --git a/src/api/configuration.ts b/src/api/configuration.ts new file mode 100644 index 0000000..6d621b1 --- /dev/null +++ b/src/api/configuration.ts @@ -0,0 +1,83 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + baseOptions?: any; +} + +export class Configuration { + + /** + * parameter for apiKey security + * + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + + /** + * parameter for oauth2 security + * + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.baseOptions = param.baseOptions; + } +} diff --git a/src/api/git_push.sh b/src/api/git_push.sh new file mode 100644 index 0000000..68a0a83 --- /dev/null +++ b/src/api/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh hugomario swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..c46056b --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export * from "./api"; +export * from "./configuration"; +export * from "./models"; + diff --git a/src/api/models/amt-cashout-method-data.ts b/src/api/models/amt-cashout-method-data.ts new file mode 100644 index 0000000..f0f39b9 --- /dev/null +++ b/src/api/models/amt-cashout-method-data.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface AmtCashoutMethodData + */ +export interface AmtCashoutMethodData { + + /** + * @type {any} + * @memberof AmtCashoutMethodData + */ + type?: any; +} diff --git a/src/api/models/body-offerwall-softpair-post-product-id-offerwall37d1da64-offerwall-id-post.ts b/src/api/models/body-offerwall-softpair-post-product-id-offerwall37d1da64-offerwall-id-post.ts new file mode 100644 index 0000000..0893119 --- /dev/null +++ b/src/api/models/body-offerwall-softpair-post-product-id-offerwall37d1da64-offerwall-id-post.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + */ +export interface BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost { + + /** + * @type {any} + * @memberof BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + */ + answers: any; +} diff --git a/src/api/models/body-submit-profiling-questions-product-id-profiling-questions-post.ts b/src/api/models/body-submit-profiling-questions-product-id-profiling-questions-post.ts new file mode 100644 index 0000000..dc83e7d --- /dev/null +++ b/src/api/models/body-submit-profiling-questions-product-id-profiling-questions-post.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + */ +export interface BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost { + + /** + * @type {any} + * @memberof BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + */ + answers: any; +} diff --git a/src/api/models/bucket-task.ts b/src/api/models/bucket-task.ts new file mode 100644 index 0000000..280d844 --- /dev/null +++ b/src/api/models/bucket-task.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof BucketTask + */ + id: any; + + /** + * The namespaced task id for this task within the marketplace + * + * @type {any} + * @memberof BucketTask + */ + idCode: any; + + /** + * @type {any} + * @memberof BucketTask + */ + source: any; + + /** + * expected loi in seconds + * + * @type {any} + * @memberof BucketTask + */ + loi: any; + + /** + * integer cents + * + * @type {any} + * @memberof BucketTask + */ + payout: any; +} diff --git a/src/api/models/cardinality.ts b/src/api/models/cardinality.ts new file mode 100644 index 0000000..1e77879 --- /dev/null +++ b/src/api/models/cardinality.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum Cardinality { + Star = '*', + QuestionMark = '?' +} + diff --git a/src/api/models/cash-mail-cashout-method-data.ts b/src/api/models/cash-mail-cashout-method-data.ts new file mode 100644 index 0000000..f0f9248 --- /dev/null +++ b/src/api/models/cash-mail-cashout-method-data.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CashMailCashoutMethodData + */ +export interface CashMailCashoutMethodData { + + /** + * @type {any} + * @memberof CashMailCashoutMethodData + */ + type?: any; + + /** + * Delivery address where payment should be sent + * + * @type {any} + * @memberof CashMailCashoutMethodData + */ + deliveryAddress: any; +} diff --git a/src/api/models/cashout-method-foreign-value-response.ts b/src/api/models/cashout-method-foreign-value-response.ts new file mode 100644 index 0000000..08f7e3d --- /dev/null +++ b/src/api/models/cashout-method-foreign-value-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { CashoutMethodForeignValue } from './cashout-method-foreign-value'; + /** + * + * + * @export + * @interface CashoutMethodForeignValueResponse + */ +export interface CashoutMethodForeignValueResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof CashoutMethodForeignValueResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof CashoutMethodForeignValueResponse + */ + msg?: any; + + /** + * @type {CashoutMethodForeignValue} + * @memberof CashoutMethodForeignValueResponse + */ + cashoutMethodValue: CashoutMethodForeignValue; +} diff --git a/src/api/models/cashout-method-foreign-value.ts b/src/api/models/cashout-method-foreign-value.ts new file mode 100644 index 0000000..565304e --- /dev/null +++ b/src/api/models/cashout-method-foreign-value.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof CashoutMethodForeignValue + */ + value: any; + + /** + * 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 {any} + * @memberof CashoutMethodForeignValue + */ + currency: any; + + /** + * A string representation of the value in the currency. + * + * @type {any} + * @memberof CashoutMethodForeignValue + */ + valueString: any; +} diff --git a/src/api/models/cashout-method-out.ts b/src/api/models/cashout-method-out.ts new file mode 100644 index 0000000..762a4a6 --- /dev/null +++ b/src/api/models/cashout-method-out.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CashoutMethodOut + */ +export interface CashoutMethodOut { + + /** + * Unique ID for this cashout method + * + * @type {any} + * @memberof CashoutMethodOut + */ + id: any; + + /** + * The currency of the cashout. Only USD is supported. + * + * @type {any} + * @memberof CashoutMethodOut + */ + currency?: any; + + /** + * The base currency of the money paid out. This is used for e.g. sending an Amazon UK gift card + * + * @type {any} + * @memberof CashoutMethodOut + */ + originalCurrency?: any; + + /** + * @type {any} + * @memberof CashoutMethodOut + */ + data: any; + + /** + * The description of the cashout method. + * + * @type {any} + * @memberof CashoutMethodOut + */ + description: any; + + /** + * Link to an image to display + * + * @type {any} + * @memberof CashoutMethodOut + */ + imageUrl?: any; + + /** + * (USD cents) The maximum amount that can be cashed out in one transaction. + * + * @type {any} + * @memberof CashoutMethodOut + */ + maxValue: any; + + /** + * (USD cents) The minimum amount that can be cashed out in one transaction. + * + * @type {any} + * @memberof CashoutMethodOut + */ + minValue: any; + + /** + * A descriptive name for the cashout method. + * + * @type {any} + * @memberof CashoutMethodOut + */ + name: any; + + /** + * 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 - __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 {any} + * @memberof CashoutMethodOut + */ + type: any; + + /** + * An external ID. Can be shown to a user to disambiguate a user'spossibly multiple methods + * + * @type {any} + * @memberof CashoutMethodOut + */ + extId?: any; + + /** + * @type {any} + * @memberof CashoutMethodOut + */ + productId?: any; + + /** + * A unique identifier for each user, which is set by the Supplier. It should not contain any sensitive informationlike email or names, and should avoid using anyincrementing values. + * + * @type {any} + * @memberof CashoutMethodOut + */ + productUserId?: any; +} diff --git a/src/api/models/cashout-method-response.ts b/src/api/models/cashout-method-response.ts new file mode 100644 index 0000000..70b6c68 --- /dev/null +++ b/src/api/models/cashout-method-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { CashoutMethodOut } from './cashout-method-out'; + /** + * + * + * @export + * @interface CashoutMethodResponse + */ +export interface CashoutMethodResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof CashoutMethodResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof CashoutMethodResponse + */ + msg?: any; + + /** + * @type {CashoutMethodOut} + * @memberof CashoutMethodResponse + */ + cashoutMethod: CashoutMethodOut; +} diff --git a/src/api/models/cashout-methods-response.ts b/src/api/models/cashout-methods-response.ts new file mode 100644 index 0000000..3b5b21a --- /dev/null +++ b/src/api/models/cashout-methods-response.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CashoutMethodsResponse + */ +export interface CashoutMethodsResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof CashoutMethodsResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof CashoutMethodsResponse + */ + msg?: any; + + /** + * @type {any} + * @memberof CashoutMethodsResponse + */ + cashoutMethods: any; +} diff --git a/src/api/models/cashout-request-info.ts b/src/api/models/cashout-request-info.ts new file mode 100644 index 0000000..3186ec0 --- /dev/null +++ b/src/api/models/cashout-request-info.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 { + + /** + * Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid. + * + * @type {any} + * @memberof CashoutRequestInfo + */ + id: any; + + /** + * This is the name of the cashout method. + * + * @type {any} + * @memberof CashoutRequestInfo + */ + description: any; + + /** + * @type {any} + * @memberof CashoutRequestInfo + */ + message?: any; + + /** + * - `PENDING` = PENDING - `APPROVED` = APPROVED - `REJECTED` = REJECTED - `CANCELLED` = CANCELLED - `FAILED` = FAILED - `COMPLETE` = COMPLETE + * + * @type {any} + * @memberof CashoutRequestInfo + */ + status?: any; + + /** + * @type {any} + * @memberof CashoutRequestInfo + */ + transactionInfo?: any; +} diff --git a/src/api/models/cashout-request-response.ts b/src/api/models/cashout-request-response.ts new file mode 100644 index 0000000..6f56a2f --- /dev/null +++ b/src/api/models/cashout-request-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { CashoutRequestInfo } from './cashout-request-info'; + /** + * + * + * @export + * @interface CashoutRequestResponse + */ +export interface CashoutRequestResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof CashoutRequestResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof CashoutRequestResponse + */ + msg?: any; + + /** + * @type {CashoutRequestInfo} + * @memberof CashoutRequestResponse + */ + cashout: CashoutRequestInfo; +} diff --git a/src/api/models/category-association.ts b/src/api/models/category-association.ts new file mode 100644 index 0000000..356754b --- /dev/null +++ b/src/api/models/category-association.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof CategoryAssociation + */ + id: any; + + /** + * The category label + * + * @type {any} + * @memberof CategoryAssociation + */ + label: any; + + /** + * @type {any} + * @memberof CategoryAssociation + */ + adwordsId?: any; + + /** + * @type {any} + * @memberof CategoryAssociation + */ + adwordsLabel?: any; + + /** + * The strength of the association of this bucketwith this category. Will sum to 1 within a bucket. + * + * @type {any} + * @memberof CategoryAssociation + */ + p: any; +} diff --git a/src/api/models/category.ts b/src/api/models/category.ts new file mode 100644 index 0000000..e3c53cf --- /dev/null +++ b/src/api/models/category.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface Category + */ +export interface Category { + + /** + * @type {any} + * @memberof Category + */ + id: any; + + /** + * @type {any} + * @memberof Category + */ + adwordsVerticalId?: any; + + /** + * @type {any} + * @memberof Category + */ + label: any; + + /** + * @type {any} + * @memberof Category + */ + path: any; + + /** + * @type {any} + * @memberof Category + */ + parentId?: any; +} diff --git a/src/api/models/count-stat.ts b/src/api/models/count-stat.ts new file mode 100644 index 0000000..1434d6e --- /dev/null +++ b/src/api/models/count-stat.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CountStat + */ +export interface CountStat { + + /** + * The grouping criteria + * + * @type {any} + * @memberof CountStat + */ + facet: any; + + /** + * The count value for the given metric and facet + * + * @type {any} + * @memberof CountStat + */ + count: any; +} diff --git a/src/api/models/create-cash-mail-cashout-method-request.ts b/src/api/models/create-cash-mail-cashout-method-request.ts new file mode 100644 index 0000000..3041747 --- /dev/null +++ b/src/api/models/create-cash-mail-cashout-method-request.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CreateCashMailCashoutMethodRequest + */ +export interface CreateCashMailCashoutMethodRequest { + + /** + * (product_user_id) The user to create this cashout method for. + * + * @type {any} + * @memberof CreateCashMailCashoutMethodRequest + */ + bpuid: any; + + /** + * @type {any} + * @memberof CreateCashMailCashoutMethodRequest + */ + type?: any; + + /** + * Delivery address where payment should be sent + * + * @type {any} + * @memberof CreateCashMailCashoutMethodRequest + */ + deliveryAddress: any; +} diff --git a/src/api/models/create-cashout-request.ts b/src/api/models/create-cashout-request.ts new file mode 100644 index 0000000..5a8ca5b --- /dev/null +++ b/src/api/models/create-cashout-request.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CreateCashoutRequest + */ +export interface CreateCashoutRequest { + + /** + * (product_user_id) The user requesting a cashout. + * + * @type {any} + * @memberof CreateCashoutRequest + */ + bpuid: any; + + /** + * (USD cents) The amount requested for the cashout. + * + * @type {any} + * @memberof CreateCashoutRequest + */ + amount: any; + + /** + * Unique ID for the cashout method the cashout is being requested with. + * + * @type {any} + * @memberof CreateCashoutRequest + */ + cashoutMethodId: any; +} diff --git a/src/api/models/create-pay-pal-cashout-method-request.ts b/src/api/models/create-pay-pal-cashout-method-request.ts new file mode 100644 index 0000000..c493267 --- /dev/null +++ b/src/api/models/create-pay-pal-cashout-method-request.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface CreatePayPalCashoutMethodRequest + */ +export interface CreatePayPalCashoutMethodRequest { + + /** + * (product_user_id) The user to create this cashout method for. + * + * @type {any} + * @memberof CreatePayPalCashoutMethodRequest + */ + bpuid: any; + + /** + * @type {any} + * @memberof CreatePayPalCashoutMethodRequest + */ + type?: any; + + /** + * Email address of the paypal user + * + * @type {any} + * @memberof CreatePayPalCashoutMethodRequest + */ + email: any; +} diff --git a/src/api/models/duration-summary.ts b/src/api/models/duration-summary.ts new file mode 100644 index 0000000..86693a1 --- /dev/null +++ b/src/api/models/duration-summary.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * Durations are in integer seconds. Describes the statistical distribution of expected durations of tasks within this bucket. + * + * @export + * @interface DurationSummary + */ +export interface DurationSummary { + + /** + * @type {any} + * @memberof DurationSummary + */ + min: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + max: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + mean?: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + q1: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + q2: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + q3: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + lowerWhisker: any; + + /** + * @type {any} + * @memberof DurationSummary + */ + upperWhisker: any; +} diff --git a/src/api/models/httpvalidation-error.ts b/src/api/models/httpvalidation-error.ts new file mode 100644 index 0000000..93d7610 --- /dev/null +++ b/src/api/models/httpvalidation-error.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface HTTPValidationError + */ +export interface HTTPValidationError { + + /** + * @type {any} + * @memberof HTTPValidationError + */ + detail?: any; +} diff --git a/src/api/models/index.ts b/src/api/models/index.ts new file mode 100644 index 0000000..f8e599c --- /dev/null +++ b/src/api/models/index.ts @@ -0,0 +1,119 @@ +export * from './amt-cashout-method-data'; +export * from './body-offerwall-softpair-post-product-id-offerwall37d1da64-offerwall-id-post'; +export * from './body-submit-profiling-questions-product-id-profiling-questions-post'; +export * from './bucket-task'; +export * from './cardinality'; +export * from './cash-mail-cashout-method-data'; +export * from './cashout-method-foreign-value'; +export * from './cashout-method-foreign-value-response'; +export * from './cashout-method-out'; +export * from './cashout-method-response'; +export * from './cashout-methods-response'; +export * from './cashout-request-info'; +export * from './cashout-request-response'; +export * from './category'; +export * from './category-association'; +export * from './count-stat'; +export * from './create-cash-mail-cashout-method-request'; +export * from './create-cashout-request'; +export * from './create-pay-pal-cashout-method-request'; +export * from './duration-summary'; +export * from './httpvalidation-error'; +export * from './leaderboard'; +export * from './leaderboard-code'; +export * from './leaderboard-frequency'; +export * from './leaderboard-response'; +export * from './leaderboard-row'; +export * from './leaderboard-winner'; +export * from './leaderboard-winner-response'; +export * from './market-profile-knowledge'; +export * from './marketplace-bucket'; +export * from './marketplace-inventory-summary'; +export * from './marketplace-offerwall'; +export * from './marketplace-offerwall-response'; +export * from './marketplace-summary'; +export * from './offer-wall-info'; +export * from './one-shot-offerwall'; +export * from './one-shot-offerwall-bucket'; +export * from './one-shot-offerwall-response'; +export * from './pattern-validation'; +export * from './payout-status'; +export * from './payout-summary'; +export * from './payout-type'; +export * from './paypal-cashout-method-data'; +export * from './profiling-info-response'; +export * from './property-type'; +export * from './question-info'; +export * from './question-option'; +export * from './redemption-currency'; +export * from './report-task'; +export * from './report-value'; +export * from './session-adjusted-status'; +export * from './session-status-code2'; +export * from './single-entry-bucket'; +export * from './single-entry-offer-wall'; +export * from './single-entry-offer-wall-response'; +export * from './soft-pair-bucket'; +export * from './soft-pair-offerwall'; +export * from './soft-pair-offerwall-response'; +export * from './source'; +export * from './starwall-offer-wall'; +export * from './starwall-offer-wall-response'; +export * from './starwall-plus-block-offer-wall'; +export * from './starwall-plus-block-offer-wall-response'; +export * from './starwall-plus-block-recontact-offer-wall'; +export * from './starwall-plus-block-recontact-offer-wall-response'; +export * from './starwall-plus-offer-wall'; +export * from './starwall-plus-offer-wall-response'; +export * from './statistical-summary-stat'; +export * from './statistical-summary-value'; +export * from './status-code1'; +export * from './status-info-response-fail'; +export * from './status-response'; +export * from './status-response-failure'; +export * from './status-success-fail'; +export * from './tango-cashout-method-data'; +export * from './task-status-response-out'; +export * from './tasks-status-response-out'; +export * from './top-nbucket'; +export * from './top-noffer-wall'; +export * from './top-noffer-wall-response'; +export * from './top-nplus-block-offer-wall'; +export * from './top-nplus-block-offer-wall-response'; +export * from './top-nplus-block-recontact-offer-wall'; +export * from './top-nplus-block-recontact-offer-wall-response'; +export * from './top-nplus-bucket'; +export * from './top-nplus-offer-wall'; +export * from './top-nplus-offer-wall-response'; +export * from './top-nplus-recontact-bucket'; +export * from './upkimportance'; +export * from './usdelivery-address'; +export * from './upk-question'; +export * from './upk-question-choice'; +export * from './upk-question-choice-out'; +export * from './upk-question-configuration-mc'; +export * from './upk-question-configuration-slider'; +export * from './upk-question-configuration-te'; +export * from './upk-question-out'; +export * from './upk-question-response'; +export * from './upk-question-selector-hidden'; +export * from './upk-question-selector-mc'; +export * from './upk-question-selector-slider'; +export * from './upk-question-selector-te'; +export * from './upk-question-type'; +export * from './upk-question-validation'; +export * from './user-info'; +export * from './user-info-response'; +export * from './user-profile-knowledge'; +export * from './user-profile-knowledge-answer'; +export * from './user-question-answer-in'; +export * from './user-transaction-history-response'; +export * from './user-transaction-row'; +export * from './user-wallet-balance'; +export * from './user-wallet-balance-response'; +export * from './user-wallet-config'; +export * from './user-wallet-transaction-type'; +export * from './validation-error'; +export * from './wxetofferwall'; +export * from './wxetofferwall-bucket'; +export * from './wxetofferwall-response'; diff --git a/src/api/models/leaderboard-code.ts b/src/api/models/leaderboard-code.ts new file mode 100644 index 0000000..1fe111a --- /dev/null +++ b/src/api/models/leaderboard-code.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * The type of leaderboard. What the \"values\" represent. + * @export + * @enum {string} + */ +export enum LeaderboardCode { + CompleteCount = 'complete_count', + LargestUserPayout = 'largest_user_payout', + SumUserPayout = 'sum_user_payout' +} + diff --git a/src/api/models/leaderboard-frequency.ts b/src/api/models/leaderboard-frequency.ts new file mode 100644 index 0000000..1570d8c --- /dev/null +++ b/src/api/models/leaderboard-frequency.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * The time period range for the leaderboard. + * @export + * @enum {string} + */ +export enum LeaderboardFrequency { + Daily = 'daily', + Weekly = 'weekly', + Monthly = 'monthly' +} + diff --git a/src/api/models/leaderboard-response.ts b/src/api/models/leaderboard-response.ts new file mode 100644 index 0000000..f121576 --- /dev/null +++ b/src/api/models/leaderboard-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { Leaderboard } from './leaderboard'; + /** + * + * + * @export + * @interface LeaderboardResponse + */ +export interface LeaderboardResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof LeaderboardResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof LeaderboardResponse + */ + msg?: any; + + /** + * @type {Leaderboard} + * @memberof LeaderboardResponse + */ + leaderboard: Leaderboard; +} diff --git a/src/api/models/leaderboard-row.ts b/src/api/models/leaderboard-row.ts new file mode 100644 index 0000000..5d51d34 --- /dev/null +++ b/src/api/models/leaderboard-row.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface LeaderboardRow + */ +export interface LeaderboardRow { + + /** + * product_user_id + * + * @type {any} + * @memberof LeaderboardRow + */ + bpuid: any; + + /** + * The numerical data ranks (1 through n) of the values. Ties are ranked using the lowest rank in the group. + * + * @type {any} + * @memberof LeaderboardRow + */ + rank: any; + + /** + * The value. The meaning of the value is dependent on the LeaderboardCode. + * + * @type {any} + * @memberof LeaderboardRow + */ + value: any; +} diff --git a/src/api/models/leaderboard-winner-response.ts b/src/api/models/leaderboard-winner-response.ts new file mode 100644 index 0000000..3919366 --- /dev/null +++ b/src/api/models/leaderboard-winner-response.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface LeaderboardWinnerResponse + */ +export interface LeaderboardWinnerResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof LeaderboardWinnerResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof LeaderboardWinnerResponse + */ + msg?: any; + + /** + * @type {any} + * @memberof LeaderboardWinnerResponse + */ + winners?: any; +} diff --git a/src/api/models/leaderboard-winner.ts b/src/api/models/leaderboard-winner.ts new file mode 100644 index 0000000..912039e --- /dev/null +++ b/src/api/models/leaderboard-winner.ts @@ -0,0 +1,108 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface LeaderboardWinner + */ +export interface LeaderboardWinner { + + /** + * The user's final rank in the leaderboard + * + * @type {any} + * @memberof LeaderboardWinner + */ + rank: any; + + /** + * 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 {any} + * @memberof LeaderboardWinner + */ + freq: any; + + /** + * 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 {any} + * @memberof LeaderboardWinner + */ + boardCode: any; + + /** + * The country this leaderboard is for. + * + * @type {any} + * @memberof LeaderboardWinner + */ + countryIso: any; + + /** + * When the prize was issued. + * + * @type {any} + * @memberof LeaderboardWinner + */ + issued: any; + + /** + * product_user_id + * + * @type {any} + * @memberof LeaderboardWinner + */ + bpuid: any; + + /** + * @type {any} + * @memberof LeaderboardWinner + */ + description: any; + + /** + * (USD cents) The reward amount + * + * @type {any} + * @memberof LeaderboardWinner + */ + amount: any; + + /** + * The amount as a formatted string in USD. Can be displayed to the user. + * + * @type {any} + * @memberof LeaderboardWinner + */ + amountStr: any; + + /** + * When the leaderboard started + * + * @type {any} + * @memberof LeaderboardWinner + */ + contestStart: any; + + /** + * When the leaderboard ended + * + * @type {any} + * @memberof LeaderboardWinner + */ + contestEnd: any; +} diff --git a/src/api/models/leaderboard.ts b/src/api/models/leaderboard.ts new file mode 100644 index 0000000..7a09b44 --- /dev/null +++ b/src/api/models/leaderboard.ts @@ -0,0 +1,170 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof Leaderboard + */ + id: any; + + /** + * Descriptive name for the leaderboard based on the board_code + * + * @type {any} + * @memberof Leaderboard + */ + name: any; + + /** + * 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 {any} + * @memberof Leaderboard + */ + boardCode: any; + + /** + * product_id + * + * @type {any} + * @memberof Leaderboard + */ + bpid: any; + + /** + * The country this leaderboard is for. + * + * @type {any} + * @memberof Leaderboard + */ + countryIso: any; + + /** + * 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 {any} + * @memberof Leaderboard + */ + freq: any; + + /** + * (unix timestamp) The time it is right now + * + * @type {any} + * @memberof Leaderboard + */ + nowTimestamp: any; + + /** + * The time it is right now (local time, in the leaderboard's timezone). + * + * @type {any} + * @memberof Leaderboard + */ + localTime: any; + + /** + * (unix timestamp) The timestamp of the leaderboard. This is the UTC timestamp of the start of the leaderboard. + * + * @type {any} + * @memberof Leaderboard + */ + timestamp: any; + + /** + * (unix timestamp) The start time of the time range this leaderboard covers. + * + * @type {any} + * @memberof Leaderboard + */ + startTimestamp: any; + + /** + * (unix timestamp) The end time of the time range this leaderboard covers. + * + * @type {any} + * @memberof Leaderboard + */ + endTimestamp: any; + + /** + * The start time of the time range this leaderboard covers (local time, in the leaderboard's timezone). + * + * @type {any} + * @memberof Leaderboard + */ + localStartTime: any; + + /** + * The end time of the time range this leaderboard covers (local time, in the leaderboard's timezone). + * + * @type {any} + * @memberof Leaderboard + */ + localEndTime: any; + + /** + * A formatted string for time range covered by this leaderboard. Can be used to display to users. + * + * @type {any} + * @memberof Leaderboard + */ + startEndStr: any; + + /** + * The timezone for the requested country + * + * @type {any} + * @memberof Leaderboard + */ + timezoneName: any; + + /** + * The UTC offset for the timezone + * + * @type {any} + * @memberof Leaderboard + */ + utcOffset: any; + + /** + * @type {any} + * @memberof Leaderboard + */ + sortOrder?: any; + + /** + * The total number of rows in the leaderboard. + * + * @type {any} + * @memberof Leaderboard + */ + rowCount: any; + + /** + * @type {any} + * @memberof Leaderboard + */ + rows?: any; +} diff --git a/src/api/models/market-profile-knowledge.ts b/src/api/models/market-profile-knowledge.ts new file mode 100644 index 0000000..d30e3fb --- /dev/null +++ b/src/api/models/market-profile-knowledge.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface MarketProfileKnowledge + */ +export interface MarketProfileKnowledge { + + /** + * Name of the source + * + * @type {any} + * @memberof MarketProfileKnowledge + */ + source: any; + + /** + * @type {any} + * @memberof MarketProfileKnowledge + */ + questionId: any; + + /** + * @type {any} + * @memberof MarketProfileKnowledge + */ + answer?: any; + + /** + * When the User submitted this Profiling data + * + * @type {any} + * @memberof MarketProfileKnowledge + */ + created: any; +} diff --git a/src/api/models/marketplace-bucket.ts b/src/api/models/marketplace-bucket.ts new file mode 100644 index 0000000..ce66d3a --- /dev/null +++ b/src/api/models/marketplace-bucket.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { DurationSummary } from './duration-summary'; +import { PayoutSummary } from './payout-summary'; + /** + * + * + * @export + * @interface MarketplaceBucket + */ +export interface MarketplaceBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof MarketplaceBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof MarketplaceBucket + */ + uri: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * + * @type {any} + * @memberof MarketplaceBucket + */ + x?: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * + * @type {any} + * @memberof MarketplaceBucket + */ + y?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof MarketplaceBucket + */ + name?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof MarketplaceBucket + */ + description?: any; + + /** + * @type {any} + * @memberof MarketplaceBucket + */ + category?: any; + + /** + * @type {any} + * @memberof MarketplaceBucket + */ + contents: any; + + /** + * @type {DurationSummary} + * @memberof MarketplaceBucket + */ + duration: DurationSummary; + + /** + * @type {PayoutSummary} + * @memberof MarketplaceBucket + */ + payout: PayoutSummary; + + /** + * this is the source of the contents + * + * @type {any} + * @memberof MarketplaceBucket + */ + source: any; +} diff --git a/src/api/models/marketplace-inventory-summary.ts b/src/api/models/marketplace-inventory-summary.ts new file mode 100644 index 0000000..e2e6a31 --- /dev/null +++ b/src/api/models/marketplace-inventory-summary.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface MarketplaceInventorySummary + */ +export interface MarketplaceInventorySummary { + + /** + * The count of tasks that are currently live + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + liveTasks?: any; + + /** + * The count of gen-pop tasks that are currently live + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + liveGenPopTasks?: any; + + /** + * The count of tasks created + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + tasksCreated?: any; + + /** + * Number of finishes needed across all live tasks + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + requiredFinishes?: any; + + /** + * The distribution of payouts for all live tasks + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + payout?: any; + + /** + * The distribution of expected durations for all live tasks + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + expectedDuration?: any; + + /** + * The distribution of required finishes on all live tasks + * + * @type {any} + * @memberof MarketplaceInventorySummary + */ + requiredFinishesPerTask?: any; +} diff --git a/src/api/models/marketplace-offerwall-response.ts b/src/api/models/marketplace-offerwall-response.ts new file mode 100644 index 0000000..6c1f90f --- /dev/null +++ b/src/api/models/marketplace-offerwall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { MarketplaceOfferwall } from './marketplace-offerwall'; +import { OfferWallInfo } from './offer-wall-info'; + /** + * + * + * @export + * @interface MarketplaceOfferwallResponse + */ +export interface MarketplaceOfferwallResponse { + + /** + * @type {OfferWallInfo} + * @memberof MarketplaceOfferwallResponse + */ + info: OfferWallInfo; + + /** + * @type {MarketplaceOfferwall} + * @memberof MarketplaceOfferwallResponse + */ + offerwall: MarketplaceOfferwall; +} diff --git a/src/api/models/marketplace-offerwall.ts b/src/api/models/marketplace-offerwall.ts new file mode 100644 index 0000000..5882ec5 --- /dev/null +++ b/src/api/models/marketplace-offerwall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof MarketplaceOfferwall + */ + id: any; + + /** + * 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 {any} + * @memberof MarketplaceOfferwall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof MarketplaceOfferwall + */ + buckets?: any; +} diff --git a/src/api/models/marketplace-summary.ts b/src/api/models/marketplace-summary.ts new file mode 100644 index 0000000..c63fcc0 --- /dev/null +++ b/src/api/models/marketplace-summary.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface MarketplaceSummary + */ +export interface MarketplaceSummary { + + /** + * Inventory of the marketplace + * + * @type {any} + * @memberof MarketplaceSummary + */ + inventory: any; + + /** + * User activity of the marketplace + * + * @type {any} + * @memberof MarketplaceSummary + */ + userActivity?: any; +} diff --git a/src/api/models/offer-wall-info.ts b/src/api/models/offer-wall-info.ts new file mode 100644 index 0000000..84fe2bb --- /dev/null +++ b/src/api/models/offer-wall-info.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface OfferWallInfo + */ +export interface OfferWallInfo { + + /** + * @type {any} + * @memberof OfferWallInfo + */ + success: any; +} diff --git a/src/api/models/one-shot-offerwall-bucket.ts b/src/api/models/one-shot-offerwall-bucket.ts new file mode 100644 index 0000000..d45bd2c --- /dev/null +++ b/src/api/models/one-shot-offerwall-bucket.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface OneShotOfferwallBucket + */ +export interface OneShotOfferwallBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof OneShotOfferwallBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof OneShotOfferwallBucket + */ + uri: any; + + /** + * The bucket's expected duration, in seconds + * + * @type {any} + * @memberof OneShotOfferwallBucket + */ + duration: any; + + /** + * The bucket's min payout, in usd cents + * + * @type {any} + * @memberof OneShotOfferwallBucket + */ + minPayout: any; +} diff --git a/src/api/models/one-shot-offerwall-response.ts b/src/api/models/one-shot-offerwall-response.ts new file mode 100644 index 0000000..c910578 --- /dev/null +++ b/src/api/models/one-shot-offerwall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { OneShotOfferwall } from './one-shot-offerwall'; + /** + * + * + * @export + * @interface OneShotOfferwallResponse + */ +export interface OneShotOfferwallResponse { + + /** + * @type {OfferWallInfo} + * @memberof OneShotOfferwallResponse + */ + info: OfferWallInfo; + + /** + * @type {OneShotOfferwall} + * @memberof OneShotOfferwallResponse + */ + offerwall: OneShotOfferwall; +} diff --git a/src/api/models/one-shot-offerwall.ts b/src/api/models/one-shot-offerwall.ts new file mode 100644 index 0000000..c2fa921 --- /dev/null +++ b/src/api/models/one-shot-offerwall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof OneShotOfferwall + */ + id: any; + + /** + * 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 {any} + * @memberof OneShotOfferwall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof OneShotOfferwall + */ + buckets?: any; +} diff --git a/src/api/models/pattern-validation.ts b/src/api/models/pattern-validation.ts new file mode 100644 index 0000000..2588766 --- /dev/null +++ b/src/api/models/pattern-validation.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface PatternValidation + */ +export interface PatternValidation { + + /** + * Message to display if validation fails + * + * @type {any} + * @memberof PatternValidation + */ + message: any; + + /** + * Regex string to validate. min_length and max_length are checked separately, even if they are part of the regex. + * + * @type {any} + * @memberof PatternValidation + */ + pattern: any; +} diff --git a/src/api/models/payout-status.ts b/src/api/models/payout-status.ts new file mode 100644 index 0000000..d7eb044 --- /dev/null +++ b/src/api/models/payout-status.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * 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 enum PayoutStatus { + PENDING = 'PENDING', + APPROVED = 'APPROVED', + REJECTED = 'REJECTED', + CANCELLED = 'CANCELLED', + FAILED = 'FAILED', + COMPLETE = 'COMPLETE' +} + diff --git a/src/api/models/payout-summary.ts b/src/api/models/payout-summary.ts new file mode 100644 index 0000000..277bca5 --- /dev/null +++ b/src/api/models/payout-summary.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * Payouts are in Integer USD Cents + * + * @export + * @interface PayoutSummary + */ +export interface PayoutSummary { + + /** + * @type {any} + * @memberof PayoutSummary + */ + min: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + max: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + mean?: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + q1: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + q2: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + q3: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + lowerWhisker: any; + + /** + * @type {any} + * @memberof PayoutSummary + */ + upperWhisker: any; +} diff --git a/src/api/models/payout-type.ts b/src/api/models/payout-type.ts new file mode 100644 index 0000000..01197e8 --- /dev/null +++ b/src/api/models/payout-type.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * The method in which the requested payout is delivered. + * @export + * @enum {string} + */ +export enum PayoutType { + PAYPAL = 'PAYPAL', + TANGO = 'TANGO', + Dwolla = 'dwolla', + ACH = 'ACH', + CASHINMAIL = 'CASH_IN_MAIL', + PRIZE = 'PRIZE', + AMT = 'AMT', + AmtBonus = 'amt_bonus', + AmtAssignment = 'amt_assignment' +} + diff --git a/src/api/models/paypal-cashout-method-data.ts b/src/api/models/paypal-cashout-method-data.ts new file mode 100644 index 0000000..3f5eaee --- /dev/null +++ b/src/api/models/paypal-cashout-method-data.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface PaypalCashoutMethodData + */ +export interface PaypalCashoutMethodData { + + /** + * @type {any} + * @memberof PaypalCashoutMethodData + */ + type?: any; + + /** + * Email address of the paypal user + * + * @type {any} + * @memberof PaypalCashoutMethodData + */ + email: any; +} diff --git a/src/api/models/profiling-info-response.ts b/src/api/models/profiling-info-response.ts new file mode 100644 index 0000000..91557dc --- /dev/null +++ b/src/api/models/profiling-info-response.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface ProfilingInfoResponse + */ +export interface ProfilingInfoResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof ProfilingInfoResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof ProfilingInfoResponse + */ + msg?: any; + + /** + * @type {any} + * @memberof ProfilingInfoResponse + */ + profilingInfo: any; +} diff --git a/src/api/models/property-type.ts b/src/api/models/property-type.ts new file mode 100644 index 0000000..25c164b --- /dev/null +++ b/src/api/models/property-type.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum PropertyType { + I = 'i', + N = 'n', + X = 'x' +} + diff --git a/src/api/models/question-info.ts b/src/api/models/question-info.ts new file mode 100644 index 0000000..4cc2548 --- /dev/null +++ b/src/api/models/question-info.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface QuestionInfo + */ +export interface QuestionInfo { + + /** + * @type {any} + * @memberof QuestionInfo + */ + propertyId: any; + + /** + * @type {any} + * @memberof QuestionInfo + */ + propertyLabel: any; + + /** + * Allowed values: - __i__ *(UPK_ITEM)*: UserProfileKnowledge Item - __n__ *(UPK_NUMERICAL)*: UserProfileKnowledge Numerical - __x__ *(UPK_TEXT)*: UserProfileKnowledge Text + * + * @type {any} + * @memberof QuestionInfo + */ + propType?: any; + + /** + * Allowed values: - __*__ *(ZERO_OR_MORE)*: Zero or More - __?__ *(ZERO_OR_ONE)*: Zero or One + * + * @type {any} + * @memberof QuestionInfo + */ + cardinality?: any; + + /** + * @type {any} + * @memberof QuestionInfo + */ + countryIso: any; + + /** + * 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 {any} + * @memberof QuestionInfo + */ + goldStandard?: any; + + /** + * @type {any} + * @memberof QuestionInfo + */ + options?: any; + + /** + * @type {any} + * @memberof QuestionInfo + */ + category: any; +} diff --git a/src/api/models/question-option.ts b/src/api/models/question-option.ts new file mode 100644 index 0000000..06fadea --- /dev/null +++ b/src/api/models/question-option.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface QuestionOption + */ +export interface QuestionOption { + + /** + * @type {any} + * @memberof QuestionOption + */ + id: any; + + /** + * @type {any} + * @memberof QuestionOption + */ + label: any; +} diff --git a/src/api/models/redemption-currency.ts b/src/api/models/redemption-currency.ts new file mode 100644 index 0000000..1f21f49 --- /dev/null +++ b/src/api/models/redemption-currency.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * Supported Currencies for Foreign Redemptions + * @export + * @enum {string} + */ +export enum RedemptionCurrency { + USD = 'USD', + CAD = 'CAD', + GBP = 'GBP', + EUR = 'EUR', + INR = 'INR', + AUD = 'AUD', + PLN = 'PLN', + SEK = 'SEK', + SGD = 'SGD', + MXN = 'MXN' +} + diff --git a/src/api/models/report-task.ts b/src/api/models/report-task.ts new file mode 100644 index 0000000..de67811 --- /dev/null +++ b/src/api/models/report-task.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface ReportTask + */ +export interface ReportTask { + + /** + * The unique identifier for the user, which is set by the Supplier. + * + * @type {any} + * @memberof ReportTask + */ + bpuid: any; + + /** + * 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 {any} + * @memberof ReportTask + */ + reasons?: any; + + /** + * @type {any} + * @memberof ReportTask + */ + notes?: any; +} diff --git a/src/api/models/report-value.ts b/src/api/models/report-value.ts new file mode 100644 index 0000000..af4fbfb --- /dev/null +++ b/src/api/models/report-value.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * The reason a user reported a task. + * @export + * @enum {string} + */ +export enum ReportValue { + _0 = '0', + _1 = '1', + _2 = '2', + _3 = '3', + _4 = '4', + _5 = '5', + _6 = '6', + _7 = '7' +} + diff --git a/src/api/models/session-adjusted-status.ts b/src/api/models/session-adjusted-status.ts new file mode 100644 index 0000000..95e4bc9 --- /dev/null +++ b/src/api/models/session-adjusted-status.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * 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 enum SessionAdjustedStatus { + Ac = 'ac', + Af = 'af', + Pa = 'pa' +} + diff --git a/src/api/models/session-status-code2.ts b/src/api/models/session-status-code2.ts new file mode 100644 index 0000000..3fd7025 --- /dev/null +++ b/src/api/models/session-status-code2.ts @@ -0,0 +1,35 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * __Status Detail__ This should be set if the Session.status_code_1 is SESSION_XXX_FAIL + * @export + * @enum {string} + */ +export enum SessionStatusCode2 { + _1 = '1', + _2 = '2', + _3 = '3', + _4 = '4', + _5 = '5', + _6 = '6', + _7 = '7', + _8 = '8', + _9 = '9', + _10 = '10', + _11 = '11', + _12 = '12', + _13 = '13' +} + diff --git a/src/api/models/single-entry-bucket.ts b/src/api/models/single-entry-bucket.ts new file mode 100644 index 0000000..a00c96d --- /dev/null +++ b/src/api/models/single-entry-bucket.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface SingleEntryBucket + */ +export interface SingleEntryBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof SingleEntryBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof SingleEntryBucket + */ + uri: any; +} diff --git a/src/api/models/single-entry-offer-wall-response.ts b/src/api/models/single-entry-offer-wall-response.ts new file mode 100644 index 0000000..4d77d21 --- /dev/null +++ b/src/api/models/single-entry-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { SingleEntryOfferWall } from './single-entry-offer-wall'; + /** + * + * + * @export + * @interface SingleEntryOfferWallResponse + */ +export interface SingleEntryOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof SingleEntryOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {SingleEntryOfferWall} + * @memberof SingleEntryOfferWallResponse + */ + offerwall: SingleEntryOfferWall; +} diff --git a/src/api/models/single-entry-offer-wall.ts b/src/api/models/single-entry-offer-wall.ts new file mode 100644 index 0000000..6e1b90e --- /dev/null +++ b/src/api/models/single-entry-offer-wall.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof SingleEntryOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof SingleEntryOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof SingleEntryOfferWall + */ + buckets?: any; + + /** + * 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 {any} + * @memberof SingleEntryOfferWall + */ + payoutFormat: any; +} diff --git a/src/api/models/soft-pair-bucket.ts b/src/api/models/soft-pair-bucket.ts new file mode 100644 index 0000000..f794141 --- /dev/null +++ b/src/api/models/soft-pair-bucket.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface SoftPairBucket + */ +export interface SoftPairBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof SoftPairBucket + */ + id: any; + + /** + * 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. + * + * @type {any} + * @memberof SoftPairBucket + */ + uri: any; + + /** + * @type {any} + * @memberof SoftPairBucket + */ + category?: any; + + /** + * @type {any} + * @memberof SoftPairBucket + */ + contents: any; + + /** + * @type {any} + * @memberof SoftPairBucket + */ + eligibility: any; + + /** + * @type {any} + * @memberof SoftPairBucket + */ + missingQuestions?: any; + + /** + * this is the max loi of the contents + * + * @type {any} + * @memberof SoftPairBucket + */ + loi: any; + + /** + * this is the min payout of the contents + * + * @type {any} + * @memberof SoftPairBucket + */ + payout: any; +} diff --git a/src/api/models/soft-pair-offerwall-response.ts b/src/api/models/soft-pair-offerwall-response.ts new file mode 100644 index 0000000..6b33edd --- /dev/null +++ b/src/api/models/soft-pair-offerwall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { SoftPairOfferwall } from './soft-pair-offerwall'; + /** + * + * + * @export + * @interface SoftPairOfferwallResponse + */ +export interface SoftPairOfferwallResponse { + + /** + * @type {OfferWallInfo} + * @memberof SoftPairOfferwallResponse + */ + info: OfferWallInfo; + + /** + * @type {SoftPairOfferwall} + * @memberof SoftPairOfferwallResponse + */ + offerwall: SoftPairOfferwall; +} diff --git a/src/api/models/soft-pair-offerwall.ts b/src/api/models/soft-pair-offerwall.ts new file mode 100644 index 0000000..a15b3b8 --- /dev/null +++ b/src/api/models/soft-pair-offerwall.ts @@ -0,0 +1,50 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof SoftPairOfferwall + */ + id: any; + + /** + * 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 {any} + * @memberof SoftPairOfferwall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof SoftPairOfferwall + */ + buckets?: any; + + /** + * @type {any} + * @memberof SoftPairOfferwall + */ + questionInfo?: any; +} diff --git a/src/api/models/source.ts b/src/api/models/source.ts new file mode 100644 index 0000000..9c0d1d9 --- /dev/null +++ b/src/api/models/source.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum 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' +} + diff --git a/src/api/models/starwall-offer-wall-response.ts b/src/api/models/starwall-offer-wall-response.ts new file mode 100644 index 0000000..bdf3712 --- /dev/null +++ b/src/api/models/starwall-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { StarwallOfferWall } from './starwall-offer-wall'; + /** + * + * + * @export + * @interface StarwallOfferWallResponse + */ +export interface StarwallOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof StarwallOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {StarwallOfferWall} + * @memberof StarwallOfferWallResponse + */ + offerwall: StarwallOfferWall; +} diff --git a/src/api/models/starwall-offer-wall.ts b/src/api/models/starwall-offer-wall.ts new file mode 100644 index 0000000..2eaaef3 --- /dev/null +++ b/src/api/models/starwall-offer-wall.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof StarwallOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof StarwallOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof StarwallOfferWall + */ + buckets?: any; + + /** + * 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 {any} + * @memberof StarwallOfferWall + */ + payoutFormat: any; +} diff --git a/src/api/models/starwall-plus-block-offer-wall-response.ts b/src/api/models/starwall-plus-block-offer-wall-response.ts new file mode 100644 index 0000000..e166895 --- /dev/null +++ b/src/api/models/starwall-plus-block-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { StarwallPlusBlockOfferWall } from './starwall-plus-block-offer-wall'; + /** + * + * + * @export + * @interface StarwallPlusBlockOfferWallResponse + */ +export interface StarwallPlusBlockOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof StarwallPlusBlockOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {StarwallPlusBlockOfferWall} + * @memberof StarwallPlusBlockOfferWallResponse + */ + offerwall: StarwallPlusBlockOfferWall; +} diff --git a/src/api/models/starwall-plus-block-offer-wall.ts b/src/api/models/starwall-plus-block-offer-wall.ts new file mode 100644 index 0000000..956c49a --- /dev/null +++ b/src/api/models/starwall-plus-block-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof StarwallPlusBlockOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof StarwallPlusBlockOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof StarwallPlusBlockOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/starwall-plus-block-recontact-offer-wall-response.ts b/src/api/models/starwall-plus-block-recontact-offer-wall-response.ts new file mode 100644 index 0000000..7f51a2f --- /dev/null +++ b/src/api/models/starwall-plus-block-recontact-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { StarwallPlusBlockRecontactOfferWall } from './starwall-plus-block-recontact-offer-wall'; + /** + * + * + * @export + * @interface StarwallPlusBlockRecontactOfferWallResponse + */ +export interface StarwallPlusBlockRecontactOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof StarwallPlusBlockRecontactOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {StarwallPlusBlockRecontactOfferWall} + * @memberof StarwallPlusBlockRecontactOfferWallResponse + */ + offerwall: StarwallPlusBlockRecontactOfferWall; +} diff --git a/src/api/models/starwall-plus-block-recontact-offer-wall.ts b/src/api/models/starwall-plus-block-recontact-offer-wall.ts new file mode 100644 index 0000000..b1a400b --- /dev/null +++ b/src/api/models/starwall-plus-block-recontact-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/starwall-plus-offer-wall-response.ts b/src/api/models/starwall-plus-offer-wall-response.ts new file mode 100644 index 0000000..55b97cf --- /dev/null +++ b/src/api/models/starwall-plus-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { StarwallPlusOfferWall } from './starwall-plus-offer-wall'; + /** + * + * + * @export + * @interface StarwallPlusOfferWallResponse + */ +export interface StarwallPlusOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof StarwallPlusOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {StarwallPlusOfferWall} + * @memberof StarwallPlusOfferWallResponse + */ + offerwall: StarwallPlusOfferWall; +} diff --git a/src/api/models/starwall-plus-offer-wall.ts b/src/api/models/starwall-plus-offer-wall.ts new file mode 100644 index 0000000..dc94f77 --- /dev/null +++ b/src/api/models/starwall-plus-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof StarwallPlusOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof StarwallPlusOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof StarwallPlusOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/statistical-summary-stat.ts b/src/api/models/statistical-summary-stat.ts new file mode 100644 index 0000000..51f5167 --- /dev/null +++ b/src/api/models/statistical-summary-stat.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface StatisticalSummaryStat + */ +export interface StatisticalSummaryStat { + + /** + * The grouping criteria + * + * @type {any} + * @memberof StatisticalSummaryStat + */ + facet: any; + + /** + * Statistical Summary for the given metric and facet + * + * @type {any} + * @memberof StatisticalSummaryStat + */ + value: any; +} diff --git a/src/api/models/statistical-summary-value.ts b/src/api/models/statistical-summary-value.ts new file mode 100644 index 0000000..d89df72 --- /dev/null +++ b/src/api/models/statistical-summary-value.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface StatisticalSummaryValue + */ +export interface StatisticalSummaryValue { + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + min: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + max: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + mean: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + q1: any; + + /** + * equal to the median + * + * @type {any} + * @memberof StatisticalSummaryValue + */ + q2: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + q3: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + lowerWhisker: any; + + /** + * @type {any} + * @memberof StatisticalSummaryValue + */ + upperWhisker: any; +} diff --git a/src/api/models/status-code1.ts b/src/api/models/status-code1.ts new file mode 100644 index 0000000..3023cda --- /dev/null +++ b/src/api/models/status-code1.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * __High level status code for outcome of the session.__ This should only be NULL if the Status is ABANDON or TIMEOUT + * @export + * @enum {string} + */ +export enum StatusCode1 { + _1 = '1', + _2 = '2', + _3 = '3', + _4 = '4', + _5 = '5', + _6 = '6', + _7 = '7', + _8 = '8', + _9 = '9', + _10 = '10', + _11 = '11', + _12 = '12', + _13 = '13', + _14 = '14', + _15 = '15', + _16 = '16', + _17 = '17', + _18 = '18', + _19 = '19' +} + diff --git a/src/api/models/status-info-response-fail.ts b/src/api/models/status-info-response-fail.ts new file mode 100644 index 0000000..16bfd2c --- /dev/null +++ b/src/api/models/status-info-response-fail.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { StatusSuccessFail } from './status-success-fail'; + /** + * + * + * @export + * @interface StatusInfoResponseFail + */ +export interface StatusInfoResponseFail { + + /** + * @type {StatusSuccessFail} + * @memberof StatusInfoResponseFail + */ + info: StatusSuccessFail; + + /** + * An optional message, if success is False + * + * @type {any} + * @memberof StatusInfoResponseFail + */ + msg: any; +} diff --git a/src/api/models/status-response-failure.ts b/src/api/models/status-response-failure.ts new file mode 100644 index 0000000..4ed5347 --- /dev/null +++ b/src/api/models/status-response-failure.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface StatusResponseFailure + */ +export interface StatusResponseFailure { + + /** + * The status of the API response. + * + * @type {any} + * @memberof StatusResponseFailure + */ + status: any; + + /** + * An optional message, if the status is failure. + * + * @type {any} + * @memberof StatusResponseFailure + */ + msg: any; +} diff --git a/src/api/models/status-response.ts b/src/api/models/status-response.ts new file mode 100644 index 0000000..c7d5b89 --- /dev/null +++ b/src/api/models/status-response.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface StatusResponse + */ +export interface StatusResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof StatusResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof StatusResponse + */ + msg?: any; +} diff --git a/src/api/models/status-success-fail.ts b/src/api/models/status-success-fail.ts new file mode 100644 index 0000000..cd78611 --- /dev/null +++ b/src/api/models/status-success-fail.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface StatusSuccessFail + */ +export interface StatusSuccessFail { + + /** + * Whether the API response is successful. + * + * @type {any} + * @memberof StatusSuccessFail + */ + success?: any; +} diff --git a/src/api/models/tango-cashout-method-data.ts b/src/api/models/tango-cashout-method-data.ts new file mode 100644 index 0000000..1096235 --- /dev/null +++ b/src/api/models/tango-cashout-method-data.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface TangoCashoutMethodData + */ +export interface TangoCashoutMethodData { + + /** + * @type {any} + * @memberof TangoCashoutMethodData + */ + type?: any; + + /** + * tango utid + * + * @type {any} + * @memberof TangoCashoutMethodData + */ + utid: any; + + /** + * @type {any} + * @memberof TangoCashoutMethodData + */ + countries: any; + + /** + * @type {any} + * @memberof TangoCashoutMethodData + */ + valueType: any; +} diff --git a/src/api/models/task-status-response-out.ts b/src/api/models/task-status-response-out.ts new file mode 100644 index 0000000..a4a759d --- /dev/null +++ b/src/api/models/task-status-response-out.ts @@ -0,0 +1,186 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * Used in the Task Status API call when queried using a TSID (task status ID) Note: the api response is a little different from the internal representation b/c: - Include some old stuff: \"currency\": \"USD\", \"final_status\": 0, - status_code_1 and status_code_2 use the enum NAME, not the value - The status is the grpc's enum value, NOT the pydantic's - payout, user_payout, and user_payout_string are not Nullable - payout_format is null on list statuses + * + * @export + * @interface TaskStatusResponseOut + */ +export interface TaskStatusResponseOut { + + /** + * A unique identifier for the session + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + tsid: any; + + /** + * The BP ID of the associated respondent + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + productId: any; + + /** + * A unique identifier for each user, which is set by the Supplier + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + productUserId: any; + + /** + * When the session was started + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + started: any; + + /** + * When the session was finished + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + finished?: any; + + /** + * 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 {any} + * @memberof TaskStatusResponseOut + */ + status?: any; + + /** + * The amount paid to the supplier, in integer USD cents + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + payout?: any; + + /** + * If a payout transformation is configured on this account, this is the amount the user should earn, in integer USD cents + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + userPayout?: any; + + /** + * 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 {any} + * @memberof TaskStatusResponseOut + */ + payoutFormat?: any; + + /** + * If a payout transformation is configured on this account, this is the amount to display to the user + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + userPayoutString?: any; + + /** + * Any extra url params used in the offerwall request will be passed back here + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + kwargs?: any; + + /** + * __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 + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + statusCode1?: any; + + /** + * __Status Detail__ This should be set if the Session.status_code_1 is SESSION_XXX_FAIL Allowed values: - __ENTRY_URL_MODIFICATION__: Unable to parse either the bucket_id, request_id, or nudge_id from the url - __UNRECOGNIZED_IP__: The client's IP failed maxmind lookup, or we failed to store it for some reason - __USER_IS_ANONYMOUS__: User is using an anonymous IP - __USER_IS_BLOCKED__: User is blocked - __USER_IS_RATE_LIMITED__: User is rate limited - __UNRECOGNIZED_DEVICE__: The client's useragent was not categorized as desktop, mobile, or tablet - __OFFERWALL_EXPIRED__: The user clicked after 5 min - __INTERNAL_ERROR__: Something unexpected happened - __OFFERWALL_COUNTRY_MISMATCH__: The user requested the offerwall for a different country than their IP address indicates - __INVALID_BUCKET_ID__: The bucket id indicated in the url does not exist. This is likely due to the user clicking on a bucket for an offerwall that has already been refreshed. - __NO_TASKS_AVAILABLE__: Not necessarily the user's fault. We thought we had surveys, but due to for e.g. the user entering on a different device than we thought, there really are none. If we get a lot of these, then that might indicate something is wrong. - __ATTEMPT_IS_SUSPICIOUS__: The entrance attempt was flagged by GRLIQ as suspicious - __GRLIQ_MISSING__: No GRLIQ forensics post was received + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + statusCode2?: any; + + /** + * 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. Allowed values: - __ac__ *(ADJUSTED_TO_COMPLETE)*: Task was reconciled to complete - __af__ *(ADJUSTED_TO_FAIL)*: Task was reconciled to incomplete - __pa__ *(PAYOUT_ADJUSTMENT)*: The payout was changed. This applies to Sessions ONLY. + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + adjustedStatus?: any; + + /** + * When the adjusted status was last set. + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + adjustedTimestamp?: any; + + /** + * The new payout after adjustment. + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + adjustedPayout?: any; + + /** + * The new user_payout after adjustment. + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + adjustedUserPayout?: any; + + /** + * The new user_payout_string after adjustment. + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + adjustedUserPayoutString?: any; + + /** + * @type {any} + * @memberof TaskStatusResponseOut + */ + currency?: any; + + /** + * This is deprecated + * + * @type {any} + * @memberof TaskStatusResponseOut + */ + finalStatus?: any; + + /** + * @type {any} + * @memberof TaskStatusResponseOut + */ + bpuid: any; +} diff --git a/src/api/models/tasks-status-response-out.ts b/src/api/models/tasks-status-response-out.ts new file mode 100644 index 0000000..2ec1440 --- /dev/null +++ b/src/api/models/tasks-status-response-out.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface TasksStatusResponseOut + */ +export interface TasksStatusResponseOut { + + /** + * @type {any} + * @memberof TasksStatusResponseOut + */ + tasksStatus?: any; +} diff --git a/src/api/models/top-nbucket.ts b/src/api/models/top-nbucket.ts new file mode 100644 index 0000000..51ca65f --- /dev/null +++ b/src/api/models/top-nbucket.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { DurationSummary } from './duration-summary'; +import { PayoutSummary } from './payout-summary'; + /** + * + * + * @export + * @interface TopNBucket + */ +export interface TopNBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof TopNBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof TopNBucket + */ + uri: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * + * @type {any} + * @memberof TopNBucket + */ + x?: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * + * @type {any} + * @memberof TopNBucket + */ + y?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNBucket + */ + name?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNBucket + */ + description?: any; + + /** + * @type {any} + * @memberof TopNBucket + */ + category?: any; + + /** + * @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 {any} + * @memberof TopNBucket + */ + qualityScore: any; +} diff --git a/src/api/models/top-noffer-wall-response.ts b/src/api/models/top-noffer-wall-response.ts new file mode 100644 index 0000000..24d6b10 --- /dev/null +++ b/src/api/models/top-noffer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { TopNOfferWall } from './top-noffer-wall'; + /** + * + * + * @export + * @interface TopNOfferWallResponse + */ +export interface TopNOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof TopNOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {TopNOfferWall} + * @memberof TopNOfferWallResponse + */ + offerwall: TopNOfferWall; +} diff --git a/src/api/models/top-noffer-wall.ts b/src/api/models/top-noffer-wall.ts new file mode 100644 index 0000000..7e4b6a4 --- /dev/null +++ b/src/api/models/top-noffer-wall.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof TopNOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof TopNOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof TopNOfferWall + */ + buckets?: any; + + /** + * 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 {any} + * @memberof TopNOfferWall + */ + payoutFormat: any; +} diff --git a/src/api/models/top-nplus-block-offer-wall-response.ts b/src/api/models/top-nplus-block-offer-wall-response.ts new file mode 100644 index 0000000..9dc64b9 --- /dev/null +++ b/src/api/models/top-nplus-block-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { TopNPlusBlockOfferWall } from './top-nplus-block-offer-wall'; + /** + * + * + * @export + * @interface TopNPlusBlockOfferWallResponse + */ +export interface TopNPlusBlockOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof TopNPlusBlockOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {TopNPlusBlockOfferWall} + * @memberof TopNPlusBlockOfferWallResponse + */ + offerwall: TopNPlusBlockOfferWall; +} diff --git a/src/api/models/top-nplus-block-offer-wall.ts b/src/api/models/top-nplus-block-offer-wall.ts new file mode 100644 index 0000000..c6d2103 --- /dev/null +++ b/src/api/models/top-nplus-block-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof TopNPlusBlockOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof TopNPlusBlockOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof TopNPlusBlockOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/top-nplus-block-recontact-offer-wall-response.ts b/src/api/models/top-nplus-block-recontact-offer-wall-response.ts new file mode 100644 index 0000000..7ffb5ac --- /dev/null +++ b/src/api/models/top-nplus-block-recontact-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { TopNPlusBlockRecontactOfferWall } from './top-nplus-block-recontact-offer-wall'; + /** + * + * + * @export + * @interface TopNPlusBlockRecontactOfferWallResponse + */ +export interface TopNPlusBlockRecontactOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof TopNPlusBlockRecontactOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {TopNPlusBlockRecontactOfferWall} + * @memberof TopNPlusBlockRecontactOfferWallResponse + */ + offerwall: TopNPlusBlockRecontactOfferWall; +} diff --git a/src/api/models/top-nplus-block-recontact-offer-wall.ts b/src/api/models/top-nplus-block-recontact-offer-wall.ts new file mode 100644 index 0000000..5ff2743 --- /dev/null +++ b/src/api/models/top-nplus-block-recontact-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof TopNPlusBlockRecontactOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof TopNPlusBlockRecontactOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof TopNPlusBlockRecontactOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/top-nplus-bucket.ts b/src/api/models/top-nplus-bucket.ts new file mode 100644 index 0000000..2bfdb9e --- /dev/null +++ b/src/api/models/top-nplus-bucket.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { DurationSummary } from './duration-summary'; +import { PayoutSummary } from './payout-summary'; + /** + * + * + * @export + * @interface TopNPlusBucket + */ +export interface TopNPlusBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof TopNPlusBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof TopNPlusBucket + */ + uri: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * + * @type {any} + * @memberof TopNPlusBucket + */ + x?: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * + * @type {any} + * @memberof TopNPlusBucket + */ + y?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNPlusBucket + */ + name?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNPlusBucket + */ + description?: any; + + /** + * @type {any} + * @memberof TopNPlusBucket + */ + category?: any; + + /** + * @type {any} + * @memberof TopNPlusBucket + */ + contents: any; + + /** + * @type {DurationSummary} + * @memberof TopNPlusBucket + */ + duration: DurationSummary; + + /** + * @type {PayoutSummary} + * @memberof TopNPlusBucket + */ + payout: PayoutSummary; + + /** + * @type {any} + * @memberof TopNPlusBucket + */ + qualityScore: any; + + /** + * This will always be 'USD' + * + * @type {any} + * @memberof TopNPlusBucket + */ + currency?: any; +} diff --git a/src/api/models/top-nplus-offer-wall-response.ts b/src/api/models/top-nplus-offer-wall-response.ts new file mode 100644 index 0000000..6fba32b --- /dev/null +++ b/src/api/models/top-nplus-offer-wall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { TopNPlusOfferWall } from './top-nplus-offer-wall'; + /** + * + * + * @export + * @interface TopNPlusOfferWallResponse + */ +export interface TopNPlusOfferWallResponse { + + /** + * @type {OfferWallInfo} + * @memberof TopNPlusOfferWallResponse + */ + info: OfferWallInfo; + + /** + * @type {TopNPlusOfferWall} + * @memberof TopNPlusOfferWallResponse + */ + offerwall: TopNPlusOfferWall; +} diff --git a/src/api/models/top-nplus-offer-wall.ts b/src/api/models/top-nplus-offer-wall.ts new file mode 100644 index 0000000..f718dee --- /dev/null +++ b/src/api/models/top-nplus-offer-wall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof TopNPlusOfferWall + */ + id: any; + + /** + * 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 {any} + * @memberof TopNPlusOfferWall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof TopNPlusOfferWall + */ + buckets?: any; +} diff --git a/src/api/models/top-nplus-recontact-bucket.ts b/src/api/models/top-nplus-recontact-bucket.ts new file mode 100644 index 0000000..9fcbab2 --- /dev/null +++ b/src/api/models/top-nplus-recontact-bucket.ts @@ -0,0 +1,116 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { DurationSummary } from './duration-summary'; +import { PayoutSummary } from './payout-summary'; + /** + * + * + * @export + * @interface TopNPlusRecontactBucket + */ +export interface TopNPlusRecontactBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + uri: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + x?: any; + + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + y?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + name?: any; + + /** + * Currently unused. Will always return empty string + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + description?: any; + + /** + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + category?: any; + + /** + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + contents: any; + + /** + * @type {DurationSummary} + * @memberof TopNPlusRecontactBucket + */ + duration: DurationSummary; + + /** + * @type {PayoutSummary} + * @memberof TopNPlusRecontactBucket + */ + payout: PayoutSummary; + + /** + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + qualityScore: any; + + /** + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + isRecontact: any; + + /** + * This will always be 'USD' + * + * @type {any} + * @memberof TopNPlusRecontactBucket + */ + currency?: any; +} diff --git a/src/api/models/upk-question-choice-out.ts b/src/api/models/upk-question-choice-out.ts new file mode 100644 index 0000000..916ee38 --- /dev/null +++ b/src/api/models/upk-question-choice-out.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionChoiceOut + */ +export interface UpkQuestionChoiceOut { + + /** + * The unique identifier for a response to a qualification + * + * @type {any} + * @memberof UpkQuestionChoiceOut + */ + choiceId: any; + + /** + * The response text shown to respondents + * + * @type {any} + * @memberof UpkQuestionChoiceOut + */ + choiceText: any; + + /** + * @type {any} + * @memberof UpkQuestionChoiceOut + */ + order: any; + + /** + * @type {any} + * @memberof UpkQuestionChoiceOut + */ + group?: any; + + /** + * If answer is exclusive, it can be the only option selected + * + * @type {any} + * @memberof UpkQuestionChoiceOut + */ + exclusive?: any; +} diff --git a/src/api/models/upk-question-choice.ts b/src/api/models/upk-question-choice.ts new file mode 100644 index 0000000..2c81e74 --- /dev/null +++ b/src/api/models/upk-question-choice.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionChoice + */ +export interface UpkQuestionChoice { + + /** + * The unique identifier for a response to a qualification + * + * @type {any} + * @memberof UpkQuestionChoice + */ + choiceId: any; + + /** + * The response text shown to respondents + * + * @type {any} + * @memberof UpkQuestionChoice + */ + choiceText: any; + + /** + * @type {any} + * @memberof UpkQuestionChoice + */ + order: any; + + /** + * @type {any} + * @memberof UpkQuestionChoice + */ + group?: any; + + /** + * If answer is exclusive, it can be the only option selected + * + * @type {any} + * @memberof UpkQuestionChoice + */ + exclusive?: any; + + /** + * @type {any} + * @memberof UpkQuestionChoice + */ + importance?: any; +} diff --git a/src/api/models/upk-question-configuration-mc.ts b/src/api/models/upk-question-configuration-mc.ts new file mode 100644 index 0000000..a94ef25 --- /dev/null +++ b/src/api/models/upk-question-configuration-mc.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionConfigurationMC + */ +export interface UpkQuestionConfigurationMC { + + /** + * @type {any} + * @memberof UpkQuestionConfigurationMC + */ + maxSelect?: any; +} diff --git a/src/api/models/upk-question-configuration-slider.ts b/src/api/models/upk-question-configuration-slider.ts new file mode 100644 index 0000000..e295217 --- /dev/null +++ b/src/api/models/upk-question-configuration-slider.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionConfigurationSLIDER + */ +export interface UpkQuestionConfigurationSLIDER { + + /** + * @type {any} + * @memberof UpkQuestionConfigurationSLIDER + */ + sliderMin?: any; + + /** + * @type {any} + * @memberof UpkQuestionConfigurationSLIDER + */ + sliderMax?: any; + + /** + * @type {any} + * @memberof UpkQuestionConfigurationSLIDER + */ + sliderStart?: any; + + /** + * @type {any} + * @memberof UpkQuestionConfigurationSLIDER + */ + sliderStep?: any; +} diff --git a/src/api/models/upk-question-configuration-te.ts b/src/api/models/upk-question-configuration-te.ts new file mode 100644 index 0000000..b66658e --- /dev/null +++ b/src/api/models/upk-question-configuration-te.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionConfigurationTE + */ +export interface UpkQuestionConfigurationTE { + + /** + * Maximum str length of any input. Meant as an easy, nonregex based check. + * + * @type {any} + * @memberof UpkQuestionConfigurationTE + */ + maxLength?: any; + + /** + * Minimum str length of any input. Meant as an easy, nonregex based check. + * + * @type {any} + * @memberof UpkQuestionConfigurationTE + */ + minLength?: any; +} diff --git a/src/api/models/upk-question-out.ts b/src/api/models/upk-question-out.ts new file mode 100644 index 0000000..cb73ea2 --- /dev/null +++ b/src/api/models/upk-question-out.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { UpkQuestionType } from './upk-question-type'; + /** + * + * + * @export + * @interface UpkQuestionOut + */ +export interface UpkQuestionOut { + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + questionId?: any; + + /** + * what marketplace question this question links to + * + * @type {any} + * @memberof UpkQuestionOut + */ + extQuestionId?: any; + + /** + * @type {UpkQuestionType} + * @memberof UpkQuestionOut + */ + questionType: UpkQuestionType; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + countryIso: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + languageIso: any; + + /** + * The text shown to respondents + * + * @type {any} + * @memberof UpkQuestionOut + */ + questionText: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + choices?: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + selector?: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + configuration?: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + validation?: any; + + /** + * The number of live Tasks that use this UPK Question + * + * @type {any} + * @memberof UpkQuestionOut + */ + taskCount?: any; + + /** + * GRL's internal ranked score for the UPK Question + * + * @type {any} + * @memberof UpkQuestionOut + */ + taskScore?: any; + + /** + * @type {any} + * @memberof UpkQuestionOut + */ + p?: any; +} diff --git a/src/api/models/upk-question-response.ts b/src/api/models/upk-question-response.ts new file mode 100644 index 0000000..03323ff --- /dev/null +++ b/src/api/models/upk-question-response.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionResponse + */ +export interface UpkQuestionResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof UpkQuestionResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof UpkQuestionResponse + */ + msg?: any; + + /** + * @type {any} + * @memberof UpkQuestionResponse + */ + questions: any; + + /** + * For internal use + * + * @type {any} + * @memberof UpkQuestionResponse + */ + consentQuestions?: any; + + /** + * For internal use + * + * @type {any} + * @memberof UpkQuestionResponse + */ + specialQuestions?: any; + + /** + * The number of questions returned + * + * @type {any} + * @memberof UpkQuestionResponse + */ + count: any; +} diff --git a/src/api/models/upk-question-selector-hidden.ts b/src/api/models/upk-question-selector-hidden.ts new file mode 100644 index 0000000..1da912a --- /dev/null +++ b/src/api/models/upk-question-selector-hidden.ts @@ -0,0 +1,23 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum UpkQuestionSelectorHIDDEN { + HIDDEN = 'HIDDEN' +} + diff --git a/src/api/models/upk-question-selector-mc.ts b/src/api/models/upk-question-selector-mc.ts new file mode 100644 index 0000000..550388f --- /dev/null +++ b/src/api/models/upk-question-selector-mc.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum UpkQuestionSelectorMC { + SA = 'SA', + MA = 'MA', + DL = 'DL', + SB = 'SB', + MSB = 'MSB' +} + diff --git a/src/api/models/upk-question-selector-slider.ts b/src/api/models/upk-question-selector-slider.ts new file mode 100644 index 0000000..f16dd7f --- /dev/null +++ b/src/api/models/upk-question-selector-slider.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum UpkQuestionSelectorSLIDER { + HSLIDER = 'HSLIDER', + VSLIDER = 'VSLIDER' +} + diff --git a/src/api/models/upk-question-selector-te.ts b/src/api/models/upk-question-selector-te.ts new file mode 100644 index 0000000..b986845 --- /dev/null +++ b/src/api/models/upk-question-selector-te.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum UpkQuestionSelectorTE { + SL = 'SL', + ML = 'ML', + ETB = 'ETB' +} + diff --git a/src/api/models/upk-question-type.ts b/src/api/models/upk-question-type.ts new file mode 100644 index 0000000..7072355 --- /dev/null +++ b/src/api/models/upk-question-type.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * + * @export + * @enum {string} + */ +export enum UpkQuestionType { + MC = 'MC', + TE = 'TE', + SLIDER = 'SLIDER', + HIDDEN = 'HIDDEN' +} + diff --git a/src/api/models/upk-question-validation.ts b/src/api/models/upk-question-validation.ts new file mode 100644 index 0000000..d8470fe --- /dev/null +++ b/src/api/models/upk-question-validation.ts @@ -0,0 +1,28 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UpkQuestionValidation + */ +export interface UpkQuestionValidation { + + /** + * @type {any} + * @memberof UpkQuestionValidation + */ + patterns: any; +} diff --git a/src/api/models/upk-question.ts b/src/api/models/upk-question.ts new file mode 100644 index 0000000..045457e --- /dev/null +++ b/src/api/models/upk-question.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { UpkQuestionType } from './upk-question-type'; + /** + * + * + * @export + * @interface UpkQuestion + */ +export interface UpkQuestion { + + /** + * @type {any} + * @memberof UpkQuestion + */ + questionId?: any; + + /** + * what marketplace question this question links to + * + * @type {any} + * @memberof UpkQuestion + */ + extQuestionId?: any; + + /** + * @type {UpkQuestionType} + * @memberof UpkQuestion + */ + questionType: UpkQuestionType; + + /** + * @type {any} + * @memberof UpkQuestion + */ + countryIso: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + languageIso: any; + + /** + * The text shown to respondents + * + * @type {any} + * @memberof UpkQuestion + */ + questionText: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + choices?: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + selector?: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + configuration?: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + validation?: any; + + /** + * @type {any} + * @memberof UpkQuestion + */ + importance?: any; +} diff --git a/src/api/models/upkimportance.ts b/src/api/models/upkimportance.ts new file mode 100644 index 0000000..a6b3c15 --- /dev/null +++ b/src/api/models/upkimportance.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UPKImportance + */ +export interface UPKImportance { + + /** + * The number of live Tasks that use this UPK Question + * + * @type {any} + * @memberof UPKImportance + */ + taskCount?: any; + + /** + * GRL's internal ranked score for the UPK Question + * + * @type {any} + * @memberof UPKImportance + */ + taskScore?: any; +} diff --git a/src/api/models/usdelivery-address.ts b/src/api/models/usdelivery-address.ts new file mode 100644 index 0000000..2a3f557 --- /dev/null +++ b/src/api/models/usdelivery-address.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface USDeliveryAddress + */ +export interface USDeliveryAddress { + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + nameOrAttn: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + company?: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + phoneNumber?: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + address: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + city: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + state: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + postalCode: any; + + /** + * @type {any} + * @memberof USDeliveryAddress + */ + country?: any; +} diff --git a/src/api/models/user-info-response.ts b/src/api/models/user-info-response.ts new file mode 100644 index 0000000..4b2af90 --- /dev/null +++ b/src/api/models/user-info-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { UserInfo } from './user-info'; + /** + * + * + * @export + * @interface UserInfoResponse + */ +export interface UserInfoResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof UserInfoResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof UserInfoResponse + */ + msg?: any; + + /** + * @type {UserInfo} + * @memberof UserInfoResponse + */ + userProfile: UserInfo; +} diff --git a/src/api/models/user-info.ts b/src/api/models/user-info.ts new file mode 100644 index 0000000..0e1c641 --- /dev/null +++ b/src/api/models/user-info.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserInfo + */ +export interface UserInfo { + + /** + * @type {any} + * @memberof UserInfo + */ + userProfileKnowledge?: any; + + /** + * @type {any} + * @memberof UserInfo + */ + marketplaceProfileKnowledge?: any; +} diff --git a/src/api/models/user-profile-knowledge-answer.ts b/src/api/models/user-profile-knowledge-answer.ts new file mode 100644 index 0000000..06787f9 --- /dev/null +++ b/src/api/models/user-profile-knowledge-answer.ts @@ -0,0 +1,46 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserProfileKnowledgeAnswer + */ +export interface UserProfileKnowledgeAnswer { + + /** + * @type {any} + * @memberof UserProfileKnowledgeAnswer + */ + id?: any; + + /** + * @type {any} + * @memberof UserProfileKnowledgeAnswer + */ + label?: any; + + /** + * @type {any} + * @memberof UserProfileKnowledgeAnswer + */ + translation?: any; + + /** + * @type {any} + * @memberof UserProfileKnowledgeAnswer + */ + value?: any; +} diff --git a/src/api/models/user-profile-knowledge.ts b/src/api/models/user-profile-knowledge.ts new file mode 100644 index 0000000..30a182a --- /dev/null +++ b/src/api/models/user-profile-knowledge.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserProfileKnowledge + */ +export interface UserProfileKnowledge { + + /** + * @type {any} + * @memberof UserProfileKnowledge + */ + propertyId: any; + + /** + * @type {any} + * @memberof UserProfileKnowledge + */ + propertyLabel: any; + + /** + * @type {any} + * @memberof UserProfileKnowledge + */ + translation: any; + + /** + * @type {any} + * @memberof UserProfileKnowledge + */ + answer?: any; + + /** + * When the User submitted this Profiling data + * + * @type {any} + * @memberof UserProfileKnowledge + */ + created: any; +} diff --git a/src/api/models/user-question-answer-in.ts b/src/api/models/user-question-answer-in.ts new file mode 100644 index 0000000..74b75ef --- /dev/null +++ b/src/api/models/user-question-answer-in.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * 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 {any} + * @memberof UserQuestionAnswerIn + */ + questionId: any; + + /** + * 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 {any} + * @memberof UserQuestionAnswerIn + */ + answer: any; +} diff --git a/src/api/models/user-transaction-history-response.ts b/src/api/models/user-transaction-history-response.ts new file mode 100644 index 0000000..7664a71 --- /dev/null +++ b/src/api/models/user-transaction-history-response.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserTransactionHistoryResponse + */ +export interface UserTransactionHistoryResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof UserTransactionHistoryResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof UserTransactionHistoryResponse + */ + msg?: any; + + /** + * @type {any} + * @memberof UserTransactionHistoryResponse + */ + transactionHistory?: any; +} diff --git a/src/api/models/user-transaction-row.ts b/src/api/models/user-transaction-row.ts new file mode 100644 index 0000000..abfe579 --- /dev/null +++ b/src/api/models/user-transaction-row.ts @@ -0,0 +1,90 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserTransactionRow + */ +export interface UserTransactionRow { + + /** + * (USD cents) Positive is an increase in the user's wallet balance. For e.g.requesting a gift card would show as a negative amount. + * + * @type {any} + * @memberof UserTransactionRow + */ + amount: any; + + /** + * The 'amount' with the payout_format applied. Can be displayed to the user. + * + * @type {any} + * @memberof UserTransactionRow + */ + amountString: any; + + /** + * The product_user_id + * + * @type {any} + * @memberof UserTransactionRow + */ + bpuid: any; + + /** + * This is the name of the cashout method. + * + * @type {any} + * @memberof UserTransactionRow + */ + description: any; + + /** + * @type {any} + * @memberof UserTransactionRow + */ + id: any; + + /** + * 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 {any} + * @memberof UserTransactionRow + */ + payoutFormat: any; + + /** + * - `PENDING` = PENDING - `APPROVED` = APPROVED - `REJECTED` = REJECTED - `CANCELLED` = CANCELLED - `FAILED` = FAILED - `COMPLETE` = COMPLETE + * + * @type {any} + * @memberof UserTransactionRow + */ + status?: any; + + /** + * @type {any} + * @memberof UserTransactionRow + */ + timestamp: any; + + /** + * - `TASK_COMPLETE` = TASK_COMPLETE - `RECONCILE` = RECONCILE - `CASHOUT` = CASHOUT - `BONUS` = BONUS + * + * @type {any} + * @memberof UserTransactionRow + */ + type: any; +} diff --git a/src/api/models/user-wallet-balance-response.ts b/src/api/models/user-wallet-balance-response.ts new file mode 100644 index 0000000..f168bcd --- /dev/null +++ b/src/api/models/user-wallet-balance-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { UserWalletBalance } from './user-wallet-balance'; + /** + * + * + * @export + * @interface UserWalletBalanceResponse + */ +export interface UserWalletBalanceResponse { + + /** + * The status of the API response. + * + * @type {any} + * @memberof UserWalletBalanceResponse + */ + status: any; + + /** + * An optional message, if the status is error. + * + * @type {any} + * @memberof UserWalletBalanceResponse + */ + msg?: any; + + /** + * @type {UserWalletBalance} + * @memberof UserWalletBalanceResponse + */ + wallet: UserWalletBalance; +} diff --git a/src/api/models/user-wallet-balance.ts b/src/api/models/user-wallet-balance.ts new file mode 100644 index 0000000..92f55ff --- /dev/null +++ b/src/api/models/user-wallet-balance.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface UserWalletBalance + */ +export interface UserWalletBalance { + + /** + * (USD cents) The amount in the user's wallet. + * + * @type {any} + * @memberof UserWalletBalance + */ + amount: any; + + /** + * (USD cents) The amount in the user's wallet this is currently redeemable. + * + * @type {any} + * @memberof UserWalletBalance + */ + redeemableAmount: any; + + /** + * 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 {any} + * @memberof UserWalletBalance + */ + payoutFormat: any; + + /** + * The 'amount' with the payout_format applied. Can be displayed to the user. + * + * @type {any} + * @memberof UserWalletBalance + */ + amountString: any; + + /** + * The 'redeemable_amount' with the payout_format applied. Can be displayed to the user. + * + * @type {any} + * @memberof UserWalletBalance + */ + redeemableAmountString: any; +} diff --git a/src/api/models/user-wallet-config.ts b/src/api/models/user-wallet-config.ts new file mode 100644 index 0000000..8e26ac6 --- /dev/null +++ b/src/api/models/user-wallet-config.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * Stores configuration for the user wallet handling + * + * @export + * @interface UserWalletConfig + */ +export interface UserWalletConfig { + + /** + * If enabled, the users' wallets are managed. + * + * @type {any} + * @memberof UserWalletConfig + */ + enabled?: any; + + /** + * Uses Amazon Mechanical Turk + * + * @type {any} + * @memberof UserWalletConfig + */ + amt?: any; + + /** + * @type {any} + * @memberof UserWalletConfig + */ + supportedPayoutTypes?: any; + + /** + * Minimum cashout amount. If enabled is True and no min_cashout is set, will default to $0.01. + * + * @type {any} + * @memberof UserWalletConfig + */ + minCashout?: any; +} diff --git a/src/api/models/user-wallet-transaction-type.ts b/src/api/models/user-wallet-transaction-type.ts new file mode 100644 index 0000000..256b328 --- /dev/null +++ b/src/api/models/user-wallet-transaction-type.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/** + * The type of transaction + * @export + * @enum {string} + */ +export enum UserWalletTransactionType { + TASKCOMPLETE = 'TASK_COMPLETE', + RECONCILE = 'RECONCILE', + CASHOUT = 'CASHOUT', + BONUS = 'BONUS' +} + diff --git a/src/api/models/validation-error.ts b/src/api/models/validation-error.ts new file mode 100644 index 0000000..156dbfd --- /dev/null +++ b/src/api/models/validation-error.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface ValidationError + */ +export interface ValidationError { + + /** + * @type {any} + * @memberof ValidationError + */ + loc: any; + + /** + * @type {any} + * @memberof ValidationError + */ + msg: any; + + /** + * @type {any} + * @memberof ValidationError + */ + type: any; +} diff --git a/src/api/models/wxetofferwall-bucket.ts b/src/api/models/wxetofferwall-bucket.ts new file mode 100644 index 0000000..0358753 --- /dev/null +++ b/src/api/models/wxetofferwall-bucket.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * + * + * @export + * @interface WXETOfferwallBucket + */ +export interface WXETOfferwallBucket { + + /** + * Unique identifier this particular bucket + * + * @type {any} + * @memberof WXETOfferwallBucket + */ + id: any; + + /** + * The URL to send a respondent into. Must not edit this URL in any way + * + * @type {any} + * @memberof WXETOfferwallBucket + */ + uri: any; + + /** + * The bucket's expected duration, in seconds + * + * @type {any} + * @memberof WXETOfferwallBucket + */ + duration: any; + + /** + * The bucket's min payout, in usd cents + * + * @type {any} + * @memberof WXETOfferwallBucket + */ + minPayout: any; +} diff --git a/src/api/models/wxetofferwall-response.ts b/src/api/models/wxetofferwall-response.ts new file mode 100644 index 0000000..e0d9bf8 --- /dev/null +++ b/src/api/models/wxetofferwall-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +import { OfferWallInfo } from './offer-wall-info'; +import { WXETOfferwall } from './wxetofferwall'; + /** + * + * + * @export + * @interface WXETOfferwallResponse + */ +export interface WXETOfferwallResponse { + + /** + * @type {OfferWallInfo} + * @memberof WXETOfferwallResponse + */ + info: OfferWallInfo; + + /** + * @type {WXETOfferwall} + * @memberof WXETOfferwallResponse + */ + offerwall: WXETOfferwall; +} diff --git a/src/api/models/wxetofferwall.ts b/src/api/models/wxetofferwall.ts new file mode 100644 index 0000000..086e1ab --- /dev/null +++ b/src/api/models/wxetofferwall.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + * + * OpenAPI spec version: 1.1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + /** + * Returns buckets from WXET as single tasks Offerwall code: `55a4e1a9` + * + * @export + * @interface WXETOfferwall + */ +export interface WXETOfferwall { + + /** + * Unique identifier to reference a generated offerwall + * + * @type {any} + * @memberof WXETOfferwall + */ + id: any; + + /** + * 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 {any} + * @memberof WXETOfferwall + */ + availabilityCount: any; + + /** + * @type {any} + * @memberof WXETOfferwall + */ + buckets?: any; +} diff --git a/src/api/package.json b/src/api/package.json new file mode 100644 index 0000000..fc2b59d --- /dev/null +++ b/src/api/package.json @@ -0,0 +1,27 @@ +{ + "name": "", + "version": "1.0.0", + "description": "OpenAPI client for ", + "author": "OpenAPI-Generator Contributors", + "keywords": [ + "axios", + "typescript", + "openapi-client", + "openapi-generator", + "" + ], + "license": "Unlicense", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc --outDir dist/", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "axios": "^0.21.1" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^3.6.4" + } +} diff --git a/src/api/tsconfig.json b/src/api/tsconfig.json new file mode 100644 index 0000000..2f27acb --- /dev/null +++ b/src/api/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "es5", + "module": "commonjs", + "noImplicitAny": true, + "outDir": "dist", + "rootDir": ".", + "lib": [ + "es6", + "dom" + ], + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "node_modules" + ] +} diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx new file mode 100644 index 0000000..d2bc03e --- /dev/null +++ b/src/components/app-sidebar.tsx @@ -0,0 +1,158 @@ +"use client" + +import * as React from "react" +import {CircleDollarSign, MessageCircle, MoreVerticalIcon, SquareStack, UserCircleIcon} from "lucide-react" + +import {NavMain} from "@/components/nav-main" +import {Avatar, AvatarFallback, AvatarImage,} from "@/components/ui/avatar" +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu" +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarHeader, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + useSidebar, +} from "@/components/ui/sidebar" +import {useAppSelector} from "@/hooks.ts"; + +export function AppSidebar({...props}: React.ComponentProps) { + const app = useAppSelector(state => state.app) + + const {isMobile} = useSidebar() + + // + // + // + + return ( + + + + + + {app.panelName} + + + + + + + + + + + + + Redemption + + + + + + + + Methods + + + + + + + + + History + + + + + + + + + + + + + + + + Support + + + + + + + + + + + + + + IW + +
+ Ironwood User + + ironwood@example.com + +
+ +
+
+ + +
+ + + IW + +
+ Ironwood User + + ironwood@example.com + +
+
+
+ + + + + Account + + + +
+
+
+ +
+ ) +} diff --git a/src/components/nav-main.tsx b/src/components/nav-main.tsx new file mode 100644 index 0000000..873d236 --- /dev/null +++ b/src/components/nav-main.tsx @@ -0,0 +1,52 @@ +"use client" + +import {ListIcon, NotebookText, Users} from "lucide-react" +import { + SidebarGroup, + SidebarGroupContent, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, +} from "@/components/ui/sidebar" +import {setPage} from "@/models/appSlice.ts"; +import {useAppDispatch} from "@/hooks.ts"; + +export function NavMain() { + const dispatch = useAppDispatch() + + return ( + + + + + dispatch(setPage("offerwall"))} + > + + + Surveys + + + + + dispatch(setPage("questions"))} + > + + + Questions + + + + + + + Community + + + + + + + ) +} diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx new file mode 100644 index 0000000..5bc5ca7 --- /dev/null +++ b/src/components/site-header.tsx @@ -0,0 +1,24 @@ +import {Separator} from "@/components/ui/separator" +import {SidebarTrigger} from "@/components/ui/sidebar" +import React from "react"; + +const SiteHeader = () => { + + return ( +
+
+ + + +

"activeView"

+ +
+
+ ) +} + +export {SiteHeader} \ No newline at end of file diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx new file mode 100644 index 0000000..d21b65f --- /dev/null +++ b/src/components/ui/accordion.tsx @@ -0,0 +1,64 @@ +import * as React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { ChevronDownIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Accordion({ + ...props +}: React.ComponentProps) { + return +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180", + className + )} + {...props} + > + {children} + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..0863e40 --- /dev/null +++ b/src/components/ui/alert-dialog.tsx @@ -0,0 +1,157 @@ +"use client" + +import * as React from "react" +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" + +import { cn } from "@/lib/utils" +import { buttonVariants } from "@/components/ui/button" + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +} diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx new file mode 100644 index 0000000..1421354 --- /dev/null +++ b/src/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const alertVariants = cva( + "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + { + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/src/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..9b491fb --- /dev/null +++ b/src/components/ui/aspect-ratio.tsx @@ -0,0 +1,9 @@ +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx new file mode 100644 index 0000000..71e428b --- /dev/null +++ b/src/components/ui/avatar.tsx @@ -0,0 +1,53 @@ +"use client" + +import * as React from "react" +import * as AvatarPrimitive from "@radix-ui/react-avatar" + +import { cn } from "@/lib/utils" + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Avatar, AvatarImage, AvatarFallback } diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx new file mode 100644 index 0000000..0205413 --- /dev/null +++ b/src/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..eb88f32 --- /dev/null +++ b/src/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { ChevronRight, MoreHorizontal } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { + return