From 73fce2d81aa6859e42255ba292ff9884af2477a9 Mon Sep 17 00:00:00 2001 From: Lucas Mazza Date: Tue, 24 Sep 2024 16:16:31 -0300 Subject: [PATCH] Setup `release-please` to automate part of our release process (#96) * chore: remove generated code from repo * chore: move publish working to `release-please` * update `RELEASING.md` * chore: fix `npm run build` command --- .github/workflows/publish.yml | 18 - .github/workflows/release.yml | 41 + .gitignore | 1 + CHANGELOG.md | 1 + RELEASING.md | 20 +- dist/api.d.ts | 7883 --------------------------------- dist/api.js | 5299 ---------------------- dist/base.d.ts | 66 - dist/base.js | 65 - dist/common.d.ts | 65 - dist/common.js | 161 - dist/configuration.d.ts | 91 - dist/configuration.js | 47 - dist/environments.d.ts | 4 - dist/environments.js | 7 - dist/index.d.ts | 14 - dist/index.js | 32 - 17 files changed, 53 insertions(+), 13762 deletions(-) delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release.yml create mode 100644 CHANGELOG.md delete mode 100644 dist/api.d.ts delete mode 100644 dist/api.js delete mode 100644 dist/base.d.ts delete mode 100644 dist/base.js delete mode 100644 dist/common.d.ts delete mode 100644 dist/common.js delete mode 100644 dist/configuration.d.ts delete mode 100644 dist/configuration.js delete mode 100644 dist/environments.d.ts delete mode 100644 dist/environments.js delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index d43e99e..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Publish package to NPM -on: - release: - types: [published] -jobs: - publish: - if: github.repository == 'tremendous-rewards/tremendous-node' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..25f0474 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release: + if: github.repository == 'tremendous-rewards/tremendous-node' + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + + - run: npm run build + if: ${{ steps.release.outputs.release_created }} + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + if: ${{ steps.release.outputs.release_created }} diff --git a/.gitignore b/.gitignore index 0c0aa04..3787d62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules/ /npm-debug.log +./dist diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..825c32f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/RELEASING.md b/RELEASING.md index 2618d1b..682ebc4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,19 +7,19 @@ bin/generate && npm run build ``` After that, please review the changes to double check that the changes to the API spec were -generated correctly. Please open a Pull Request with the file changes and wait for the test pipeline -before merging it to master. +generated correctly. -## Step 2 - Update the version on `package.json` +Please open a Pull Request with the file changes and wait for the test pipeline before merging it +to main. Make sure to use [Conventional Commit messages]([2]) to help automating the process. -The Pull Request with the changes to the generated files should update the version on `package.json` -following [Semantic Versioning][2] practices - most changes here should be backwards compatible and -deserve a MINOR version update +## Step 2 - Merge the Release Please Pull Request -## Step 3 - Publish a new release on GitHub +[Release Please](https://github.com/googleapis/release-please) will maintain a "Release PR" that +consolidates updates to `CHANGELOG.md` (based on the git history) and updating the `package.json` +file. -The [publish.yml](.github/workflows/publish.yml) workflow is responsible for publishing the package to -NPM when a new release is published on GitHub. +When ready to publish a release, merge the Release PR and the [release.yml] +(.github/workflows/release.yml) workflow will publish a new package to NPM and create a release on GitHub. [1]: https://openapi-generator.tech -[2]: https://semver.org +[2]: https://www.conventionalcommits.org/en/v1.0.0/ diff --git a/dist/api.d.ts b/dist/api.d.ts deleted file mode 100644 index dbec0c1..0000000 --- a/dist/api.d.ts +++ /dev/null @@ -1,7883 +0,0 @@ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import type { RequestArgs } from './base'; -import { BaseAPI } from './base'; -/** - * Ignore flagging rules for rewards redeemed by an email or domain matching this list. - * @export - * @interface AllowEmail - */ -export interface AllowEmail { - /** - * The list of emails. - * @type {Array} - * @memberof AllowEmail - */ - 'emails': Array; -} -/** - * The list of emails and domains where a matching redemption will ignore other flagging rules and automatically go through. - * @export - * @interface AllowEmail1 - */ -export interface AllowEmail1 { - /** - * The list of emails. - * @type {Array} - * @memberof AllowEmail1 - */ - 'emails': Array; -} -/** - * Ignore flagging rules for rewards redeemed by an IP matching this list. - * @export - * @interface AllowIp - */ -export interface AllowIp { - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof AllowIp - */ - 'ips': Array; -} -/** - * The list of IP addresses and/or IP ranges where a matching redemption will ignore other flagging rules and automatically go through. - * @export - * @interface AllowIp1 - */ -export interface AllowIp1 { - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof AllowIp1 - */ - 'ips': Array; -} -/** - * A balance transaction represents a specific movement or change in an account\'s balance. - * @export - * @interface BalanceTransaction - */ -export interface BalanceTransaction { - /** - * Date that the transaction was created - * @type {string} - * @memberof BalanceTransaction - */ - 'created_at': string; - /** - * Amount of the transaction in USD - * @type {number} - * @memberof BalanceTransaction - */ - 'amount': number; - /** - * The updated total after the transaction. Note that this running balance may be delayed and contain `null`. - * @type {number} - * @memberof BalanceTransaction - */ - 'balance': number; - /** - * The action that was performed - * @type {string} - * @memberof BalanceTransaction - */ - 'action': string; - /** - * A brief description of the transaction - * @type {string} - * @memberof BalanceTransaction - */ - 'description': string; -} -/** - * - * @export - * @interface BaseOrderForCreate - */ -export interface BaseOrderForCreate { - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof BaseOrderForCreate - */ - 'external_id'?: string | null; - /** - * - * @type {SingleRewardOrder1Payment} - * @memberof BaseOrderForCreate - */ - 'payment': SingleRewardOrder1Payment; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface Campaign - */ -export interface Campaign { - /** - * - * @type {string} - * @memberof Campaign - */ - 'id'?: string; - /** - * Name of the campaign - * @type {string} - * @memberof Campaign - */ - 'name': string; - /** - * Description of the campaign - * @type {string} - * @memberof Campaign - */ - 'description': string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof Campaign - */ - 'products': Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof Campaign - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof Campaign - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface CampaignBase - */ -export interface CampaignBase { - /** - * - * @type {string} - * @memberof CampaignBase - */ - 'id'?: string; - /** - * Name of the campaign - * @type {string} - * @memberof CampaignBase - */ - 'name'?: string; - /** - * Description of the campaign - * @type {string} - * @memberof CampaignBase - */ - 'description'?: string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof CampaignBase - */ - 'products'?: Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof CampaignBase - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof CampaignBase - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * Name of the channel in which the order was created - * @export - * @enum {string} - */ -export declare const Channel: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type Channel = typeof Channel[keyof typeof Channel]; -/** - * - * @export - * @interface CreateApiKey200Response - */ -export interface CreateApiKey200Response { - /** - * The new API key - * @type {string} - * @memberof CreateApiKey200Response - */ - 'api_key'?: string; -} -/** - * - * @export - * @interface CreateCampaign201Response - */ -export interface CreateCampaign201Response { - /** - * - * @type {ListCampaigns200ResponseCampaignsInner} - * @memberof CreateCampaign201Response - */ - 'campaign': ListCampaigns200ResponseCampaignsInner; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface CreateCampaignRequest - */ -export interface CreateCampaignRequest { - /** - * Name of the campaign - * @type {string} - * @memberof CreateCampaignRequest - */ - 'name': string; - /** - * Description of the campaign - * @type {string} - * @memberof CreateCampaignRequest - */ - 'description': string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof CreateCampaignRequest - */ - 'products': Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof CreateCampaignRequest - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof CreateCampaignRequest - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * - * @export - * @interface CreateInvoice - */ -export interface CreateInvoice { - /** - * Reference to the purchase order number within your organization - * @type {string} - * @memberof CreateInvoice - */ - 'po_number'?: string | null; - /** - * Amount of the invoice in USD - * @type {number} - * @memberof CreateInvoice - */ - 'amount': number; - /** - * A note to be included in the invoice. This is for your internal use and will not be visible to the recipient. - * @type {string} - * @memberof CreateInvoice - */ - 'memo'?: string | null; -} -/** - * - * @export - * @interface CreateInvoice200Response - */ -export interface CreateInvoice200Response { - /** - * - * @type {ListInvoices200ResponseInvoicesInner} - * @memberof CreateInvoice200Response - */ - 'invoice': ListInvoices200ResponseInvoicesInner; -} -/** - * - * @export - * @interface CreateInvoiceRequest - */ -export interface CreateInvoiceRequest { - /** - * Reference to the purchase order number within your organization - * @type {string} - * @memberof CreateInvoiceRequest - */ - 'po_number'?: string | null; - /** - * Amount of the invoice in USD - * @type {number} - * @memberof CreateInvoiceRequest - */ - 'amount': number; - /** - * A note to be included in the invoice. This is for your internal use and will not be visible to the recipient. - * @type {string} - * @memberof CreateInvoiceRequest - */ - 'memo'?: string | null; -} -/** - * - * @export - * @interface CreateMember - */ -export interface CreateMember { - /** - * Email address of the member - * @type {string} - * @memberof CreateMember - */ - 'email': string; - /** - * The role ID of the member within the organization. - * @type {string} - * @memberof CreateMember - */ - 'role': string; -} -/** - * - * @export - * @interface CreateMember200Response - */ -export interface CreateMember200Response { - /** - * - * @type {ListMembers200ResponseMembersInner} - * @memberof CreateMember200Response - */ - 'member': ListMembers200ResponseMembersInner; -} -/** - * - * @export - * @interface CreateMemberRequest - */ -export interface CreateMemberRequest { - /** - * Email address of the member - * @type {string} - * @memberof CreateMemberRequest - */ - 'email': string; - /** - * The role ID of the member within the organization. - * @type {string} - * @memberof CreateMemberRequest - */ - 'role': string; -} -/** - * - * @export - * @interface CreateOrder200Response - */ -export interface CreateOrder200Response { - /** - * - * @type {ListOrders200ResponseOrdersInner} - * @memberof CreateOrder200Response - */ - 'order': ListOrders200ResponseOrdersInner; -} -/** - * @type CreateOrderRequest - * @export - */ -export type CreateOrderRequest = SingleRewardOrder1; -/** - * - * @export - * @interface CreateOrganization - */ -export interface CreateOrganization { - /** - * Name of the organization - * @type {string} - * @memberof CreateOrganization - */ - 'name': string; - /** - * URL of the website of that organization - * @type {string} - * @memberof CreateOrganization - */ - 'website': string; - /** - * Default value is `false`. Set to true to also generate an API key associated to the new organization. - * @type {boolean} - * @memberof CreateOrganization - */ - 'with_api_key'?: boolean; - /** - * - * @type {CreateOrganizationRequestCopySettings} - * @memberof CreateOrganization - */ - 'copy_settings'?: CreateOrganizationRequestCopySettings; - /** - * Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +). - * @type {string} - * @memberof CreateOrganization - */ - 'phone'?: string; -} -/** - * - * @export - * @interface CreateOrganization200Response - */ -export interface CreateOrganization200Response { - /** - * - * @type {CreateOrganization200ResponseOrganization} - * @memberof CreateOrganization200Response - */ - 'organization'?: CreateOrganization200ResponseOrganization; -} -/** - * Organizations are a way to separate different parts of your business within the same Tremendous account. Your root Tremendous account is an organization itself and can have multiple sub-organizations. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. Each organizations can have it\'s own API key. - * @export - * @interface CreateOrganization200ResponseOrganization - */ -export interface CreateOrganization200ResponseOrganization { - /** - * - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'id'?: string; - /** - * Name of the organization - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'name': string; - /** - * URL of the website of that organization - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'website': string; - /** - * Status of the organization. Organizations need to be approved to be able to use them to send out rewards. - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'status'?: CreateOrganization200ResponseOrganizationStatusEnum; - /** - * Timestamp of when the organization has been created. *This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations. - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'created_at'?: string; - /** - * The API key for the created organization. This property is only returned when `with_api_key` is set to `true`. - * @type {string} - * @memberof CreateOrganization200ResponseOrganization - */ - 'api_key'?: string; -} -export declare const CreateOrganization200ResponseOrganizationStatusEnum: { - readonly Pending: "PENDING"; - readonly Approved: "APPROVED"; - readonly Rejected: "REJECTED"; -}; -export type CreateOrganization200ResponseOrganizationStatusEnum = typeof CreateOrganization200ResponseOrganizationStatusEnum[keyof typeof CreateOrganization200ResponseOrganizationStatusEnum]; -/** - * - * @export - * @interface CreateOrganizationRequest - */ -export interface CreateOrganizationRequest { - /** - * Name of the organization - * @type {string} - * @memberof CreateOrganizationRequest - */ - 'name': string; - /** - * URL of the website of that organization - * @type {string} - * @memberof CreateOrganizationRequest - */ - 'website': string; - /** - * Default value is `false`. Set to true to also generate an API key associated to the new organization. - * @type {boolean} - * @memberof CreateOrganizationRequest - */ - 'with_api_key'?: boolean; - /** - * - * @type {CreateOrganizationRequestCopySettings} - * @memberof CreateOrganizationRequest - */ - 'copy_settings'?: CreateOrganizationRequestCopySettings; - /** - * Phone number of the organization. For non-US phone numbers, specify the country code (prefixed with +). - * @type {string} - * @memberof CreateOrganizationRequest - */ - 'phone'?: string; -} -/** - * A list of the settings that you wish to copy over to the new organization. - * @export - * @interface CreateOrganizationRequestCopySettings - */ -export interface CreateOrganizationRequestCopySettings { - /** - * Copy over the campaigns from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'campaigns'?: boolean; - /** - * Copy over the custom fields from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'custom_fields'?: boolean; - /** - * Copy over the order approvals settings from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'order_approvals'?: boolean; - /** - * Copy over the payment methods from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'payment_methods'?: boolean; - /** - * Copy over the security settings from the current organization to the new organization. Defaults to `true`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'security_settings'?: boolean; - /** - * Copy over the users and custom roles from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'users'?: boolean; - /** - * Copy over the custom roles from the current organization to the new organization. Custom roles are always copied if `users` is `true`. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'custom_roles'?: boolean; - /** - * Copy over the fraud prevention settings and rules from the current organization to the new organization. Defaults to `false`. - * @type {boolean} - * @memberof CreateOrganizationRequestCopySettings - */ - 'fraud_prevention'?: boolean; -} -/** - * - * @export - * @interface CreatePublicKey - */ -export interface CreatePublicKey { - /** - * Base64 encoded (public) PEM file - * @type {string} - * @memberof CreatePublicKey - */ - 'public_key': string; -} -/** - * - * @export - * @interface CreateWebhook200Response - */ -export interface CreateWebhook200Response { - /** - * - * @type {ListWebhooks200ResponseWebhooksInner} - * @memberof CreateWebhook200Response - */ - 'webhook'?: ListWebhooks200ResponseWebhooksInner; -} -/** - * - * @export - * @interface CreateWebhookRequest - */ -export interface CreateWebhookRequest { - /** - * URL the webhook will make requests to - * @type {string} - * @memberof CreateWebhookRequest - */ - 'url': string; -} -/** - * - * @export - * @enum {string} - */ -export declare const CurrencyCodes: { - readonly Usd: "USD"; - readonly Cad: "CAD"; - readonly Eur: "EUR"; - readonly Aed: "AED"; - readonly Afn: "AFN"; - readonly All: "ALL"; - readonly Amd: "AMD"; - readonly Ars: "ARS"; - readonly Aud: "AUD"; - readonly Azn: "AZN"; - readonly Bam: "BAM"; - readonly Bdt: "BDT"; - readonly Bgn: "BGN"; - readonly Bhd: "BHD"; - readonly Bif: "BIF"; - readonly Bnd: "BND"; - readonly Bob: "BOB"; - readonly Brl: "BRL"; - readonly Bwp: "BWP"; - readonly Byr: "BYR"; - readonly Bzd: "BZD"; - readonly Cdf: "CDF"; - readonly Chf: "CHF"; - readonly Clp: "CLP"; - readonly Cny: "CNY"; - readonly Cop: "COP"; - readonly Crc: "CRC"; - readonly Cve: "CVE"; - readonly Czk: "CZK"; - readonly Djf: "DJF"; - readonly Dkk: "DKK"; - readonly Dop: "DOP"; - readonly Dzd: "DZD"; - readonly Eek: "EEK"; - readonly Egp: "EGP"; - readonly Ern: "ERN"; - readonly Etb: "ETB"; - readonly Gbp: "GBP"; - readonly Gel: "GEL"; - readonly Ghs: "GHS"; - readonly Gnf: "GNF"; - readonly Gtq: "GTQ"; - readonly Hkd: "HKD"; - readonly Hnl: "HNL"; - readonly Hrk: "HRK"; - readonly Huf: "HUF"; - readonly Idr: "IDR"; - readonly Ils: "ILS"; - readonly Inr: "INR"; - readonly Iqd: "IQD"; - readonly Irr: "IRR"; - readonly Isk: "ISK"; - readonly Jmd: "JMD"; - readonly Jod: "JOD"; - readonly Jpy: "JPY"; - readonly Kes: "KES"; - readonly Khr: "KHR"; - readonly Krw: "KRW"; - readonly Kwd: "KWD"; - readonly Kzt: "KZT"; - readonly Lbp: "LBP"; - readonly Lkr: "LKR"; - readonly Ltl: "LTL"; - readonly Lvl: "LVL"; - readonly Mad: "MAD"; - readonly Mdl: "MDL"; - readonly Mga: "MGA"; - readonly Mkd: "MKD"; - readonly Mmk: "MMK"; - readonly Mop: "MOP"; - readonly Mur: "MUR"; - readonly Mxn: "MXN"; - readonly Myr: "MYR"; - readonly Mzn: "MZN"; - readonly Nad: "NAD"; - readonly Ngn: "NGN"; - readonly Nio: "NIO"; - readonly Nok: "NOK"; - readonly Npr: "NPR"; - readonly Nzd: "NZD"; - readonly Omr: "OMR"; - readonly Pab: "PAB"; - readonly Pen: "PEN"; - readonly Php: "PHP"; - readonly Pkr: "PKR"; - readonly Pln: "PLN"; - readonly Pyg: "PYG"; - readonly Qar: "QAR"; - readonly Ron: "RON"; - readonly Rsd: "RSD"; - readonly Rub: "RUB"; - readonly Rwf: "RWF"; - readonly Sar: "SAR"; - readonly Sdg: "SDG"; - readonly Sek: "SEK"; - readonly Sgd: "SGD"; - readonly Sos: "SOS"; - readonly Syp: "SYP"; - readonly Thb: "THB"; - readonly Tnd: "TND"; - readonly Top: "TOP"; - readonly Try: "TRY"; - readonly Ttd: "TTD"; - readonly Twd: "TWD"; - readonly Tzs: "TZS"; - readonly Uah: "UAH"; - readonly Ugx: "UGX"; - readonly Uyu: "UYU"; - readonly Uzs: "UZS"; - readonly Vef: "VEF"; - readonly Vnd: "VND"; - readonly Xaf: "XAF"; - readonly Xof: "XOF"; - readonly Yer: "YER"; - readonly Zar: "ZAR"; - readonly Zmk: "ZMK"; -}; -export type CurrencyCodes = typeof CurrencyCodes[keyof typeof CurrencyCodes]; -/** - * Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).) - * @export - * @interface CustomField - */ -export interface CustomField { - /** - * Tremendous ID of the custom field - * @type {string} - * @memberof CustomField - */ - 'id'?: string; - /** - * Value of the custom field - * @type {string} - * @memberof CustomField - */ - 'value'?: string | null; - /** - * Label of the custom field - * @type {string} - * @memberof CustomField - */ - 'label'?: string; -} -/** - * - * @export - * @interface DeleteFraudRule200Response - */ -export interface DeleteFraudRule200Response { - /** - * A description of the result - * @type {string} - * @memberof DeleteFraudRule200Response - */ - 'message': string; -} -/** - * Details on how the reward is delivered to the recipient. - * @export - * @interface DeliveryDetails - */ -export interface DeliveryDetails { - /** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @type {string} - * @memberof DeliveryDetails - */ - 'method': DeliveryDetailsMethodEnum; - /** - * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled. - * @type {string} - * @memberof DeliveryDetails - */ - 'status': DeliveryDetailsStatusEnum; -} -export declare const DeliveryDetailsMethodEnum: { - readonly Email: "EMAIL"; - readonly Link: "LINK"; - readonly Phone: "PHONE"; -}; -export type DeliveryDetailsMethodEnum = typeof DeliveryDetailsMethodEnum[keyof typeof DeliveryDetailsMethodEnum]; -export declare const DeliveryDetailsStatusEnum: { - readonly Scheduled: "SCHEDULED"; - readonly Failed: "FAILED"; - readonly Succeeded: "SUCCEEDED"; - readonly Pending: "PENDING"; -}; -export type DeliveryDetailsStatusEnum = typeof DeliveryDetailsStatusEnum[keyof typeof DeliveryDetailsStatusEnum]; -/** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @export - * @enum {string} - */ -export declare const DeliveryMethod: { - readonly Email: "EMAIL"; - readonly Link: "LINK"; - readonly Phone: "PHONE"; -}; -export type DeliveryMethod = typeof DeliveryMethod[keyof typeof DeliveryMethod]; -/** - * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled. - * @export - * @enum {string} - */ -export declare const DeliveryStatus: { - readonly Scheduled: "SCHEDULED"; - readonly Failed: "FAILED"; - readonly Succeeded: "SUCCEEDED"; - readonly Pending: "PENDING"; -}; -export type DeliveryStatus = typeof DeliveryStatus[keyof typeof DeliveryStatus]; -/** - * - * @export - * @interface ErrorModel - */ -export interface ErrorModel { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof ErrorModel - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface Field - */ -export interface Field { - /** - * - * @type {string} - * @memberof Field - */ - 'id'?: string; - /** - * Label of the field - * @type {string} - * @memberof Field - */ - 'label'?: string; - /** - * Type of the values of the field - * @type {string} - * @memberof Field - */ - 'data_type'?: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof Field - */ - 'data'?: { - [key: string]: any; - }; - /** - * Is this field required (true) or optional (false) - * @type {boolean} - * @memberof Field - */ - 'required'?: boolean; - /** - * Type of objects this field gets associated with - * @type {string} - * @memberof Field - */ - 'scope'?: string; -} -/** - * - * @export - * @interface FraudConfigAllowEmail - */ -export interface FraudConfigAllowEmail { - /** - * The list of emails. - * @type {Array} - * @memberof FraudConfigAllowEmail - */ - 'emails': Array; -} -/** - * - * @export - * @interface FraudConfigCountry - */ -export interface FraudConfigCountry { - /** - * When type is `whitelist`, it flags any countries that *are not* present in the list. When type is `blacklist`, it flags any countries that *are* present in the list. - * @type {string} - * @memberof FraudConfigCountry - */ - 'type': FraudConfigCountryTypeEnum; - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof FraudConfigCountry - */ - 'countries': Array; -} -export declare const FraudConfigCountryTypeEnum: { - readonly Whitelist: "whitelist"; - readonly Blacklist: "blacklist"; -}; -export type FraudConfigCountryTypeEnum = typeof FraudConfigCountryTypeEnum[keyof typeof FraudConfigCountryTypeEnum]; -/** - * - * @export - * @interface FraudConfigCountryUpdateList - */ -export interface FraudConfigCountryUpdateList { - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof FraudConfigCountryUpdateList - */ - 'countries': Array; -} -/** - * - * @export - * @interface FraudConfigIP - */ -export interface FraudConfigIP { - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof FraudConfigIP - */ - 'ips': Array; -} -/** - * - * @export - * @interface FraudConfigRedeemedRewardsAmount - */ -export interface FraudConfigRedeemedRewardsAmount { - /** - * The total amount in USD of redeemed rewards to use as a threshold. - * @type {number} - * @memberof FraudConfigRedeemedRewardsAmount - */ - 'amount': number; - /** - * The period, in days, to consider for the count. Use `all_time` to consider any redeemed rewards. - * @type {string} - * @memberof FraudConfigRedeemedRewardsAmount - */ - 'period': FraudConfigRedeemedRewardsAmountPeriodEnum; -} -export declare const FraudConfigRedeemedRewardsAmountPeriodEnum: { - readonly _7: "7"; - readonly _30: "30"; - readonly _90: "90"; - readonly _120: "120"; - readonly _365: "365"; - readonly AllTime: "all_time"; -}; -export type FraudConfigRedeemedRewardsAmountPeriodEnum = typeof FraudConfigRedeemedRewardsAmountPeriodEnum[keyof typeof FraudConfigRedeemedRewardsAmountPeriodEnum]; -/** - * - * @export - * @interface FraudConfigRedeemedRewardsCount - */ -export interface FraudConfigRedeemedRewardsCount { - /** - * The number of redeemed rewards to use as a threshold. - * @type {number} - * @memberof FraudConfigRedeemedRewardsCount - */ - 'amount': number; - /** - * The period, in days, to consider for the count. Use `all_time` to consider any redeemed rewards. - * @type {string} - * @memberof FraudConfigRedeemedRewardsCount - */ - 'period': FraudConfigRedeemedRewardsCountPeriodEnum; -} -export declare const FraudConfigRedeemedRewardsCountPeriodEnum: { - readonly _7: "7"; - readonly _30: "30"; - readonly _90: "90"; - readonly _120: "120"; - readonly _365: "365"; - readonly AllTime: "all_time"; -}; -export type FraudConfigRedeemedRewardsCountPeriodEnum = typeof FraudConfigRedeemedRewardsCountPeriodEnum[keyof typeof FraudConfigRedeemedRewardsCountPeriodEnum]; -/** - * - * @export - * @interface FraudConfigReviewEmail - */ -export interface FraudConfigReviewEmail { - /** - * The list of emails. - * @type {Array} - * @memberof FraudConfigReviewEmail - */ - 'emails'?: Array; - /** - * The list of domains. Any subdomains will also be matched against each entry in the list. - * @type {Array} - * @memberof FraudConfigReviewEmail - */ - 'domains'?: Array; -} -/** - * - * @export - * @interface FraudGenericResponse - */ -export interface FraudGenericResponse { - /** - * A description of the result - * @type {string} - * @memberof FraudGenericResponse - */ - 'message': string; -} -/** - * The fraud review associated with a reward. - * @export - * @interface FraudReview - */ -export interface FraudReview { - /** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @type {string} - * @memberof FraudReview - */ - 'status'?: FraudReviewStatusEnum; - /** - * The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` - * @type {Array} - * @memberof FraudReview - */ - 'reasons'?: Array; - /** - * The name of the person who reviewed the reward, or `Automatic Review` if the reward was blocked automatically. Rewards can be automatically blocked if they remain in the flagged fraud queue for more than 30 days. This field is only present if the status is not `flagged`. - * @type {string} - * @memberof FraudReview - */ - 'reviewed_by'?: string; - /** - * When the reward was blocked or released following fraud review. This field is only present if the status is not `flagged`. - * @type {string} - * @memberof FraudReview - */ - 'reviewed_at'?: string; - /** - * - * @type {GetFraudReview200ResponseFraudReviewRelatedRewards} - * @memberof FraudReview - */ - 'related_rewards'?: GetFraudReview200ResponseFraudReviewRelatedRewards; - /** - * The device fingerprint, if known. - * @type {string} - * @memberof FraudReview - */ - 'device_id'?: string; - /** - * The product selected to claim the reward - * @type {string} - * @memberof FraudReview - */ - 'redemption_method'?: FraudReviewRedemptionMethodEnum; - /** - * Date the reward was redeemed - * @type {string} - * @memberof FraudReview - */ - 'redeemed_at'?: string; - /** - * - * @type {GetFraudReview200ResponseFraudReviewGeo} - * @memberof FraudReview - */ - 'geo'?: GetFraudReview200ResponseFraudReviewGeo; - /** - * - * @type {OrderWithoutLinkRewardsInner} - * @memberof FraudReview - */ - 'reward'?: OrderWithoutLinkRewardsInner; -} -export declare const FraudReviewStatusEnum: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type FraudReviewStatusEnum = typeof FraudReviewStatusEnum[keyof typeof FraudReviewStatusEnum]; -export declare const FraudReviewReasonsEnum: { - readonly DisallowedIp: "Disallowed IP"; - readonly DisallowedEmail: "Disallowed email"; - readonly DisallowedCountry: "Disallowed country"; - readonly OverRewardDollarLimit: "Over reward dollar limit"; - readonly OverRewardCountLimit: "Over reward count limit"; - readonly VpnDetected: "VPN detected"; - readonly DeviceRelatedToMultipleEmails: "Device related to multiple emails"; - readonly DeviceOrAccountRelatedToMultipleEmails: "Device or account related to multiple emails"; - readonly IpOnATremendousFraudList: "IP on a Tremendous fraud list"; - readonly BankAccountOnATremendousFraudList: "Bank account on a Tremendous fraud list"; - readonly FingerprintOnATremendousFraudList: "Fingerprint on a Tremendous fraud list"; - readonly EmailOnATremendousFraudList: "Email on a Tremendous fraud list"; - readonly PhoneOnATremendousFraudList: "Phone on a Tremendous fraud list"; - readonly IpRelatedToABlockedReward: "IP related to a blocked reward"; - readonly BankAccountRelatedToABlockedReward: "Bank account related to a blocked reward"; - readonly FingerprintRelatedToABlockedReward: "Fingerprint related to a blocked reward"; - readonly EmailRelatedToABlockedReward: "Email related to a blocked reward"; - readonly PhoneRelatedToABlockedReward: "Phone related to a blocked reward"; - readonly AllowedIp: "Allowed IP"; - readonly AllowedEmail: "Allowed email"; -}; -export type FraudReviewReasonsEnum = typeof FraudReviewReasonsEnum[keyof typeof FraudReviewReasonsEnum]; -export declare const FraudReviewRedemptionMethodEnum: { - readonly Paypal: "paypal"; - readonly Bank: "bank"; - readonly MerchantCard: "merchant card"; - readonly VisaCard: "visa card"; - readonly Charity: "charity"; - readonly Venmo: "venmo"; -}; -export type FraudReviewRedemptionMethodEnum = typeof FraudReviewRedemptionMethodEnum[keyof typeof FraudReviewRedemptionMethodEnum]; -/** - * - * @export - * @interface FraudReviewGeo - */ -export interface FraudReviewGeo { - /** - * The recipient\'s IP. - * @type {string} - * @memberof FraudReviewGeo - */ - 'ip'?: string; - /** - * The country code (ISO-3166 alpha-2 character code) linked to the recipient\'s IP. - * @type {string} - * @memberof FraudReviewGeo - */ - 'country'?: string; - /** - * The city associated with the recipient\'s IP. - * @type {string} - * @memberof FraudReviewGeo - */ - 'city'?: string; -} -/** - * The fraud review associated with a reward. - * @export - * @interface FraudReviewListItem - */ -export interface FraudReviewListItem { - /** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @type {string} - * @memberof FraudReviewListItem - */ - 'status'?: FraudReviewListItemStatusEnum; - /** - * The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` - * @type {Array} - * @memberof FraudReviewListItem - */ - 'reasons'?: Array; - /** - * - * @type {OrderWithoutLinkRewardsInner} - * @memberof FraudReviewListItem - */ - 'reward'?: OrderWithoutLinkRewardsInner; -} -export declare const FraudReviewListItemStatusEnum: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type FraudReviewListItemStatusEnum = typeof FraudReviewListItemStatusEnum[keyof typeof FraudReviewListItemStatusEnum]; -export declare const FraudReviewListItemReasonsEnum: { - readonly DisallowedIp: "Disallowed IP"; - readonly DisallowedEmail: "Disallowed email"; - readonly DisallowedCountry: "Disallowed country"; - readonly OverRewardDollarLimit: "Over reward dollar limit"; - readonly OverRewardCountLimit: "Over reward count limit"; - readonly VpnDetected: "VPN detected"; - readonly DeviceRelatedToMultipleEmails: "Device related to multiple emails"; - readonly DeviceOrAccountRelatedToMultipleEmails: "Device or account related to multiple emails"; - readonly IpOnATremendousFraudList: "IP on a Tremendous fraud list"; - readonly BankAccountOnATremendousFraudList: "Bank account on a Tremendous fraud list"; - readonly FingerprintOnATremendousFraudList: "Fingerprint on a Tremendous fraud list"; - readonly EmailOnATremendousFraudList: "Email on a Tremendous fraud list"; - readonly PhoneOnATremendousFraudList: "Phone on a Tremendous fraud list"; - readonly IpRelatedToABlockedReward: "IP related to a blocked reward"; - readonly BankAccountRelatedToABlockedReward: "Bank account related to a blocked reward"; - readonly FingerprintRelatedToABlockedReward: "Fingerprint related to a blocked reward"; - readonly EmailRelatedToABlockedReward: "Email related to a blocked reward"; - readonly PhoneRelatedToABlockedReward: "Phone related to a blocked reward"; - readonly AllowedIp: "Allowed IP"; - readonly AllowedEmail: "Allowed email"; -}; -export type FraudReviewListItemReasonsEnum = typeof FraudReviewListItemReasonsEnum[keyof typeof FraudReviewListItemReasonsEnum]; -/** - * - * @export - * @enum {string} - */ -export declare const FraudReviewReason: { - readonly DisallowedIp: "Disallowed IP"; - readonly DisallowedEmail: "Disallowed email"; - readonly DisallowedCountry: "Disallowed country"; - readonly OverRewardDollarLimit: "Over reward dollar limit"; - readonly OverRewardCountLimit: "Over reward count limit"; - readonly VpnDetected: "VPN detected"; - readonly DeviceRelatedToMultipleEmails: "Device related to multiple emails"; - readonly DeviceOrAccountRelatedToMultipleEmails: "Device or account related to multiple emails"; - readonly IpOnATremendousFraudList: "IP on a Tremendous fraud list"; - readonly BankAccountOnATremendousFraudList: "Bank account on a Tremendous fraud list"; - readonly FingerprintOnATremendousFraudList: "Fingerprint on a Tremendous fraud list"; - readonly EmailOnATremendousFraudList: "Email on a Tremendous fraud list"; - readonly PhoneOnATremendousFraudList: "Phone on a Tremendous fraud list"; - readonly IpRelatedToABlockedReward: "IP related to a blocked reward"; - readonly BankAccountRelatedToABlockedReward: "Bank account related to a blocked reward"; - readonly FingerprintRelatedToABlockedReward: "Fingerprint related to a blocked reward"; - readonly EmailRelatedToABlockedReward: "Email related to a blocked reward"; - readonly PhoneRelatedToABlockedReward: "Phone related to a blocked reward"; - readonly AllowedIp: "Allowed IP"; - readonly AllowedEmail: "Allowed email"; -}; -export type FraudReviewReason = typeof FraudReviewReason[keyof typeof FraudReviewReason]; -/** - * - * @export - * @enum {string} - */ -export declare const FraudReviewRedemptionMethod: { - readonly Paypal: "paypal"; - readonly Bank: "bank"; - readonly MerchantCard: "merchant card"; - readonly VisaCard: "visa card"; - readonly Charity: "charity"; - readonly Venmo: "venmo"; -}; -export type FraudReviewRedemptionMethod = typeof FraudReviewRedemptionMethod[keyof typeof FraudReviewRedemptionMethod]; -/** - * - * @export - * @interface FraudReviewRelatedRewards - */ -export interface FraudReviewRelatedRewards { - /** - * The IDs of rewards that have similar attributes to the fraud reward. A maximum of 100 IDs is returned. - * @type {Array} - * @memberof FraudReviewRelatedRewards - */ - 'ids'?: Array; - /** - * How many related rewards were found in total. - * @type {number} - * @memberof FraudReviewRelatedRewards - */ - 'count'?: number; - /** - * How many related rewards have been blocked. - * @type {number} - * @memberof FraudReviewRelatedRewards - */ - 'blocked_count'?: number; - /** - * Total amount claimed by the related rewards (in USD). - * @type {number} - * @memberof FraudReviewRelatedRewards - */ - 'aggregated_value'?: number; -} -/** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @export - * @enum {string} - */ -export declare const FraudReviewStatus: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type FraudReviewStatus = typeof FraudReviewStatus[keyof typeof FraudReviewStatus]; -/** - * - * @export - * @interface FraudRule200Response - */ -export interface FraudRule200Response { - /** - * A description of the result - * @type {string} - * @memberof FraudRule200Response - */ - 'message': string; -} -/** - * - * @export - * @interface FraudRule400Response - */ -export interface FraudRule400Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof FraudRule400Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface FraudRule422Response - */ -export interface FraudRule422Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof FraudRule422Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface FraudRuleRequest - */ -export interface FraudRuleRequest { - /** - * - * @type {FraudRuleRequestConfig} - * @memberof FraudRuleRequest - */ - 'config'?: FraudRuleRequestConfig; -} -/** - * The configuration associated with the rule. The properties allowed depend on the type of rule. - * @export - * @interface FraudRuleRequestConfig - */ -export interface FraudRuleRequestConfig { - /** - * When type is `whitelist`, it flags any countries that *are not* present in the list. When type is `blacklist`, it flags any countries that *are* present in the list. - * @type {string} - * @memberof FraudRuleRequestConfig - */ - 'type': FraudRuleRequestConfigTypeEnum; - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof FraudRuleRequestConfig - */ - 'countries': Array; - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof FraudRuleRequestConfig - */ - 'ips': Array; - /** - * The list of emails. - * @type {Array} - * @memberof FraudRuleRequestConfig - */ - 'emails': Array; - /** - * The list of domains. Any subdomains will also be matched against each entry in the list. - * @type {Array} - * @memberof FraudRuleRequestConfig - */ - 'domains'?: Array; - /** - * The total amount in USD of redeemed rewards to use as a threshold. - * @type {number} - * @memberof FraudRuleRequestConfig - */ - 'amount': number; - /** - * The period, in days, to consider for the count. Use `all_time` to consider any redeemed rewards. - * @type {string} - * @memberof FraudRuleRequestConfig - */ - 'period': FraudRuleRequestConfigPeriodEnum; -} -export declare const FraudRuleRequestConfigTypeEnum: { - readonly Whitelist: "whitelist"; - readonly Blacklist: "blacklist"; -}; -export type FraudRuleRequestConfigTypeEnum = typeof FraudRuleRequestConfigTypeEnum[keyof typeof FraudRuleRequestConfigTypeEnum]; -export declare const FraudRuleRequestConfigPeriodEnum: { - readonly _7: "7"; - readonly _30: "30"; - readonly _90: "90"; - readonly _120: "120"; - readonly _365: "365"; - readonly AllTime: "all_time"; -}; -export type FraudRuleRequestConfigPeriodEnum = typeof FraudRuleRequestConfigPeriodEnum[keyof typeof FraudRuleRequestConfigPeriodEnum]; -/** - * * `review_country` - Flags when the recipient\'s IP country matches the criteria in the rule * `review_ip` - Flags when recipient\'s IP matches one in the list * `review_email` - Flags when the recipient\'s email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config * `review_multiple_emails` - Flags when recipient\'s device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient\'s IP matches one in the list * `allow_email` - Releases a reward when the recipient\'s email matches one in the list - * @export - * @enum {string} - */ -export declare const FraudRuleType: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly ReviewRedeemedRewardsCount: "review_redeemed_rewards_count"; - readonly ReviewRedeemedRewardsAmount: "review_redeemed_rewards_amount"; - readonly ReviewMultipleEmails: "review_multiple_emails"; - readonly ReviewVpn: "review_vpn"; - readonly ReviewTremendousFlagList: "review_tremendous_flag_list"; - readonly ReviewPreviouslyBlockedRecipients: "review_previously_blocked_recipients"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type FraudRuleType = typeof FraudRuleType[keyof typeof FraudRuleType]; -/** - * An active fraud rule - * @export - * @interface FraudRulesListItem - */ -export interface FraudRulesListItem { - /** - * * `review_country` - Flags when the recipient\'s IP country matches the criteria in the rule * `review_ip` - Flags when recipient\'s IP matches one in the list * `review_email` - Flags when the recipient\'s email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config * `review_multiple_emails` - Flags when recipient\'s device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient\'s IP matches one in the list * `allow_email` - Releases a reward when the recipient\'s email matches one in the list - * @type {string} - * @memberof FraudRulesListItem - */ - 'rule_type'?: FraudRulesListItemRuleTypeEnum; - /** - * The configuration associated with the rule. The properties allowed depend on the type of rule. This property is only present for rules that require configuration. - * @type {object} - * @memberof FraudRulesListItem - */ - 'config'?: object | null; -} -export declare const FraudRulesListItemRuleTypeEnum: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly ReviewRedeemedRewardsCount: "review_redeemed_rewards_count"; - readonly ReviewRedeemedRewardsAmount: "review_redeemed_rewards_amount"; - readonly ReviewMultipleEmails: "review_multiple_emails"; - readonly ReviewVpn: "review_vpn"; - readonly ReviewTremendousFlagList: "review_tremendous_flag_list"; - readonly ReviewPreviouslyBlockedRecipients: "review_previously_blocked_recipients"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type FraudRulesListItemRuleTypeEnum = typeof FraudRulesListItemRuleTypeEnum[keyof typeof FraudRulesListItemRuleTypeEnum]; -/** - * - * @export - * @interface FundingSource - */ -export interface FundingSource { - /** - * - * @type {string} - * @memberof FundingSource - */ - 'id': string; - /** - * You can pay for rewards using different payment methods on Tremendous:
Payment Method Description
balance Pre-funded balance in your Tremendous account to draw funds from to send rewards to recipients.
bank_account Bank account to draw funds from to send rewards to recipients.
credit_card Credit card to draw funds from to send rewards to recipients.
invoice Send rewards to recipients and pay by invoice.
- * @type {string} - * @memberof FundingSource - */ - 'method': FundingSourceMethodEnum; - /** - * **Only available when `method` is set to `invoice`.** - * @type {string} - * @memberof FundingSource - */ - 'type'?: FundingSourceTypeEnum; - /** - * - * @type {ListFundingSources200ResponseFundingSourcesInnerMeta} - * @memberof FundingSource - */ - 'meta': ListFundingSources200ResponseFundingSourcesInnerMeta; -} -export declare const FundingSourceMethodEnum: { - readonly Balance: "balance"; - readonly BankAccount: "bank_account"; - readonly CreditCard: "credit_card"; - readonly Invoice: "invoice"; -}; -export type FundingSourceMethodEnum = typeof FundingSourceMethodEnum[keyof typeof FundingSourceMethodEnum]; -export declare const FundingSourceTypeEnum: { - readonly Commercial: "COMMERCIAL"; - readonly ProForma: "PRO_FORMA"; - readonly PrefundingOnly: "PREFUNDING_ONLY"; -}; -export type FundingSourceTypeEnum = typeof FundingSourceTypeEnum[keyof typeof FundingSourceTypeEnum]; -/** - * - * @export - * @interface GenerateRewardLink200Response - */ -export interface GenerateRewardLink200Response { - /** - * - * @type {GenerateRewardLink200ResponseReward} - * @memberof GenerateRewardLink200Response - */ - 'reward': GenerateRewardLink200ResponseReward; -} -/** - * The redemption link for a reward. - * @export - * @interface GenerateRewardLink200ResponseReward - */ -export interface GenerateRewardLink200ResponseReward { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof GenerateRewardLink200ResponseReward - */ - 'id'?: string; - /** - * Link to redeem the reward at. You need to deliver this link to the recipient. - * @type {string} - * @memberof GenerateRewardLink200ResponseReward - */ - 'link'?: string; -} -/** - * - * @export - * @interface GenerateRewardLink403Response - */ -export interface GenerateRewardLink403Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof GenerateRewardLink403Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface GenerateRewardToken200Response - */ -export interface GenerateRewardToken200Response { - /** - * - * @type {GenerateRewardToken200ResponseReward} - * @memberof GenerateRewardToken200Response - */ - 'reward': GenerateRewardToken200ResponseReward; -} -/** - * The redemption token for a reward. - * @export - * @interface GenerateRewardToken200ResponseReward - */ -export interface GenerateRewardToken200ResponseReward { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof GenerateRewardToken200ResponseReward - */ - 'id'?: string; - /** - * The token to redeem the reward. - * @type {string} - * @memberof GenerateRewardToken200ResponseReward - */ - 'token'?: string; - /** - * Date the token expires - * @type {string} - * @memberof GenerateRewardToken200ResponseReward - */ - 'expires_at'?: string; -} -/** - * - * @export - * @interface GetFraudReview200Response - */ -export interface GetFraudReview200Response { - /** - * - * @type {GetFraudReview200ResponseFraudReview} - * @memberof GetFraudReview200Response - */ - 'fraud_review': GetFraudReview200ResponseFraudReview; -} -/** - * The fraud review associated with a reward. - * @export - * @interface GetFraudReview200ResponseFraudReview - */ -export interface GetFraudReview200ResponseFraudReview { - /** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'status'?: GetFraudReview200ResponseFraudReviewStatusEnum; - /** - * The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` - * @type {Array} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'reasons'?: Array; - /** - * The name of the person who reviewed the reward, or `Automatic Review` if the reward was blocked automatically. Rewards can be automatically blocked if they remain in the flagged fraud queue for more than 30 days. This field is only present if the status is not `flagged`. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'reviewed_by'?: string; - /** - * When the reward was blocked or released following fraud review. This field is only present if the status is not `flagged`. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'reviewed_at'?: string; - /** - * - * @type {GetFraudReview200ResponseFraudReviewRelatedRewards} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'related_rewards'?: GetFraudReview200ResponseFraudReviewRelatedRewards; - /** - * The device fingerprint, if known. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'device_id'?: string; - /** - * The product selected to claim the reward - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'redemption_method'?: GetFraudReview200ResponseFraudReviewRedemptionMethodEnum; - /** - * Date the reward was redeemed - * @type {string} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'redeemed_at'?: string; - /** - * - * @type {GetFraudReview200ResponseFraudReviewGeo} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'geo'?: GetFraudReview200ResponseFraudReviewGeo; - /** - * - * @type {ListRewards200ResponseRewardsInner} - * @memberof GetFraudReview200ResponseFraudReview - */ - 'reward'?: ListRewards200ResponseRewardsInner; -} -export declare const GetFraudReview200ResponseFraudReviewStatusEnum: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type GetFraudReview200ResponseFraudReviewStatusEnum = typeof GetFraudReview200ResponseFraudReviewStatusEnum[keyof typeof GetFraudReview200ResponseFraudReviewStatusEnum]; -export declare const GetFraudReview200ResponseFraudReviewReasonsEnum: { - readonly DisallowedIp: "Disallowed IP"; - readonly DisallowedEmail: "Disallowed email"; - readonly DisallowedCountry: "Disallowed country"; - readonly OverRewardDollarLimit: "Over reward dollar limit"; - readonly OverRewardCountLimit: "Over reward count limit"; - readonly VpnDetected: "VPN detected"; - readonly DeviceRelatedToMultipleEmails: "Device related to multiple emails"; - readonly DeviceOrAccountRelatedToMultipleEmails: "Device or account related to multiple emails"; - readonly IpOnATremendousFraudList: "IP on a Tremendous fraud list"; - readonly BankAccountOnATremendousFraudList: "Bank account on a Tremendous fraud list"; - readonly FingerprintOnATremendousFraudList: "Fingerprint on a Tremendous fraud list"; - readonly EmailOnATremendousFraudList: "Email on a Tremendous fraud list"; - readonly PhoneOnATremendousFraudList: "Phone on a Tremendous fraud list"; - readonly IpRelatedToABlockedReward: "IP related to a blocked reward"; - readonly BankAccountRelatedToABlockedReward: "Bank account related to a blocked reward"; - readonly FingerprintRelatedToABlockedReward: "Fingerprint related to a blocked reward"; - readonly EmailRelatedToABlockedReward: "Email related to a blocked reward"; - readonly PhoneRelatedToABlockedReward: "Phone related to a blocked reward"; - readonly AllowedIp: "Allowed IP"; - readonly AllowedEmail: "Allowed email"; -}; -export type GetFraudReview200ResponseFraudReviewReasonsEnum = typeof GetFraudReview200ResponseFraudReviewReasonsEnum[keyof typeof GetFraudReview200ResponseFraudReviewReasonsEnum]; -export declare const GetFraudReview200ResponseFraudReviewRedemptionMethodEnum: { - readonly Paypal: "paypal"; - readonly Bank: "bank"; - readonly MerchantCard: "merchant card"; - readonly VisaCard: "visa card"; - readonly Charity: "charity"; - readonly Venmo: "venmo"; -}; -export type GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = typeof GetFraudReview200ResponseFraudReviewRedemptionMethodEnum[keyof typeof GetFraudReview200ResponseFraudReviewRedemptionMethodEnum]; -/** - * The Geo location, based on the recipient\'s IP. - * @export - * @interface GetFraudReview200ResponseFraudReviewGeo - */ -export interface GetFraudReview200ResponseFraudReviewGeo { - /** - * The recipient\'s IP. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReviewGeo - */ - 'ip'?: string; - /** - * The country code (ISO-3166 alpha-2 character code) linked to the recipient\'s IP. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReviewGeo - */ - 'country'?: string; - /** - * The city associated with the recipient\'s IP. - * @type {string} - * @memberof GetFraudReview200ResponseFraudReviewGeo - */ - 'city'?: string; -} -/** - * The related rewards associated with the fraud review. - * @export - * @interface GetFraudReview200ResponseFraudReviewRelatedRewards - */ -export interface GetFraudReview200ResponseFraudReviewRelatedRewards { - /** - * The IDs of rewards that have similar attributes to the fraud reward. A maximum of 100 IDs is returned. - * @type {Array} - * @memberof GetFraudReview200ResponseFraudReviewRelatedRewards - */ - 'ids'?: Array; - /** - * How many related rewards were found in total. - * @type {number} - * @memberof GetFraudReview200ResponseFraudReviewRelatedRewards - */ - 'count'?: number; - /** - * How many related rewards have been blocked. - * @type {number} - * @memberof GetFraudReview200ResponseFraudReviewRelatedRewards - */ - 'blocked_count'?: number; - /** - * Total amount claimed by the related rewards (in USD). - * @type {number} - * @memberof GetFraudReview200ResponseFraudReviewRelatedRewards - */ - 'aggregated_value'?: number; -} -/** - * - * @export - * @interface GetFundingSource200Response - */ -export interface GetFundingSource200Response { - /** - * - * @type {ListFundingSources200ResponseFundingSourcesInner} - * @memberof GetFundingSource200Response - */ - 'funding_source': ListFundingSources200ResponseFundingSourcesInner; -} -/** - * - * @export - * @interface GetMember200Response - */ -export interface GetMember200Response { - /** - * - * @type {GetMember200ResponseMember} - * @memberof GetMember200Response - */ - 'member': GetMember200ResponseMember; -} -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface GetMember200ResponseMember - */ -export interface GetMember200ResponseMember { - /** - * - * @type {string} - * @memberof GetMember200ResponseMember - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof GetMember200ResponseMember - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof GetMember200ResponseMember - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof GetMember200ResponseMember - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof GetMember200ResponseMember - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof GetMember200ResponseMember - */ - 'status': GetMember200ResponseMemberStatusEnum; - /** - * List of events related to the member. - * @type {Array} - * @memberof GetMember200ResponseMember - */ - 'events'?: Array; -} -export declare const GetMember200ResponseMemberStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type GetMember200ResponseMemberStatusEnum = typeof GetMember200ResponseMemberStatusEnum[keyof typeof GetMember200ResponseMemberStatusEnum]; -/** - * - * @export - * @interface GetMember200ResponseMemberEventsInner - */ -export interface GetMember200ResponseMemberEventsInner { - /** - * Event type - * @type {string} - * @memberof GetMember200ResponseMemberEventsInner - */ - 'type'?: GetMember200ResponseMemberEventsInnerTypeEnum; - /** - * Timestamp when the event happened - * @type {string} - * @memberof GetMember200ResponseMemberEventsInner - */ - 'date_utc'?: string | null; -} -export declare const GetMember200ResponseMemberEventsInnerTypeEnum: { - readonly Created: "created"; - readonly LastLogin: "last_login"; -}; -export type GetMember200ResponseMemberEventsInnerTypeEnum = typeof GetMember200ResponseMemberEventsInnerTypeEnum[keyof typeof GetMember200ResponseMemberEventsInnerTypeEnum]; -/** - * - * @export - * @interface GetOrganization200Response - */ -export interface GetOrganization200Response { - /** - * - * @type {ListOrganizations200ResponseOrganizationsInner} - * @memberof GetOrganization200Response - */ - 'organization'?: ListOrganizations200ResponseOrganizationsInner; -} -/** - * - * @export - * @interface GetProductResponse - */ -export interface GetProductResponse { - /** - * - * @type {ListProductsResponseProductsInner} - * @memberof GetProductResponse - */ - 'product': ListProductsResponseProductsInner; -} -/** - * - * @export - * @interface GetReward200Response - */ -export interface GetReward200Response { - /** - * - * @type {ListRewards200ResponseRewardsInner} - * @memberof GetReward200Response - */ - 'reward': ListRewards200ResponseRewardsInner; -} -/** - * Invoices are instruments to fund your Tremendous account\'s balance. Invoices can be created by your organization programatically. Once we receive your payment, the invoice is marked as `PAID` and we add the respective funds to your account\'s balance. - * @export - * @interface Invoice - */ -export interface Invoice { - /** - * The invoice number - * @type {string} - * @memberof Invoice - */ - 'id': string; - /** - * Reference to the purchase order number within your organization - * @type {string} - * @memberof Invoice - */ - 'po_number'?: string | null; - /** - * Amount of the invoice in USD - * @type {number} - * @memberof Invoice - */ - 'amount': number; - /** - * Status of this invoice
Status Description
DELETED Invoice has been deleted by your organization
PAID Invoice has been paid by your organization
OPEN Invoice has been created by your organization but has not been paid, yet
- * @type {string} - * @memberof Invoice - */ - 'status': InvoiceStatusEnum; - /** - * List of orders related to the invoice (it doesn\'t apply to prefunding) - * @type {Array} - * @memberof Invoice - */ - 'orders'?: Array; - /** - * List of rewards related to the invoice (it doesn\'t apply to prefunding) - * @type {Array} - * @memberof Invoice - */ - 'rewards'?: Array; - /** - * Timestamp of when the invoice has been created. - * @type {string} - * @memberof Invoice - */ - 'created_at': string; - /** - * Timestamp of when the invoice has been paid. - * @type {string} - * @memberof Invoice - */ - 'paid_at': string | null; -} -export declare const InvoiceStatusEnum: { - readonly Deleted: "DELETED"; - readonly Paid: "PAID"; - readonly Open: "OPEN"; - readonly MarkedAsPaid: "MARKED_AS_PAID"; -}; -export type InvoiceStatusEnum = typeof InvoiceStatusEnum[keyof typeof InvoiceStatusEnum]; -/** - * - * @export - * @interface ListBalanceTransactions200Response - */ -export interface ListBalanceTransactions200Response { - /** - * - * @type {Array} - * @memberof ListBalanceTransactions200Response - */ - 'transactions': Array; -} -/** - * A balance transaction represents a specific movement or change in an account\'s balance. - * @export - * @interface ListBalanceTransactions200ResponseTransactionsInner - */ -export interface ListBalanceTransactions200ResponseTransactionsInner { - /** - * Date that the transaction was created - * @type {string} - * @memberof ListBalanceTransactions200ResponseTransactionsInner - */ - 'created_at': string; - /** - * Amount of the transaction in USD - * @type {number} - * @memberof ListBalanceTransactions200ResponseTransactionsInner - */ - 'amount': number; - /** - * The updated total after the transaction. Note that this running balance may be delayed and contain `null`. - * @type {number} - * @memberof ListBalanceTransactions200ResponseTransactionsInner - */ - 'balance': number; - /** - * The action that was performed - * @type {string} - * @memberof ListBalanceTransactions200ResponseTransactionsInner - */ - 'action': string; - /** - * A brief description of the transaction - * @type {string} - * @memberof ListBalanceTransactions200ResponseTransactionsInner - */ - 'description': string; -} -/** - * - * @export - * @interface ListCampaigns200Response - */ -export interface ListCampaigns200Response { - /** - * - * @type {Array} - * @memberof ListCampaigns200Response - */ - 'campaigns': Array; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface ListCampaigns200ResponseCampaignsInner - */ -export interface ListCampaigns200ResponseCampaignsInner { - /** - * - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'id'?: string; - /** - * Name of the campaign - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'name': string; - /** - * Description of the campaign - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'description': string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'products': Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof ListCampaigns200ResponseCampaignsInner - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * Definition of the email style - * @export - * @interface ListCampaigns200ResponseCampaignsInnerEmailStyle - */ -export interface ListCampaigns200ResponseCampaignsInnerEmailStyle { - /** - * If sending via email, this is how the email will appear to be sent from - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'sender_name'?: string | null; - /** - * Email subject line - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'subject_line'?: string | null; - /** - * URL of a publicly-accessible image (png, jpeg, jpg, gif, or svg). This image will be copied to our storage location. - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'logo_image_url'?: string | null; - /** - * Image height in pixels - * @type {number} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'logo_image_height_px'?: number | null; - /** - * Logo backgrond color code (hex, rgb, or rgba) - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'logo_background_color'?: string | null; - /** - * Button color code (hex, rgb, or rgba) - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerEmailStyle - */ - 'button_color'?: string | null; -} -/** - * Definition of the webpage style - * @export - * @interface ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ -export interface ListCampaigns200ResponseCampaignsInnerWebpageStyle { - /** - * Headline for the reward page - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'headline'?: string | null; - /** - * Message for the reward page - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'message'?: string; - /** - * URL of a publicly-accessible image (png, jpeg, jpg, gif, or svg). This image will be copied to our storage location. - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'logo_image_url'?: string | null; - /** - * Image height in pixels - * @type {number} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'logo_image_height_px'?: number | null; - /** - * Logo backgrond color code (hex, rgb, or rgba) - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'logo_background_color'?: string | null; - /** - * Backgrond color code (hex, rgb, or rgba) - * @type {string} - * @memberof ListCampaigns200ResponseCampaignsInnerWebpageStyle - */ - 'background_color'?: string | null; -} -/** - * - * @export - * @interface ListFields200Response - */ -export interface ListFields200Response { - /** - * - * @type {Array} - * @memberof ListFields200Response - */ - 'fields'?: Array; -} -/** - * - * @export - * @interface ListFields200ResponseFieldsInner - */ -export interface ListFields200ResponseFieldsInner { - /** - * - * @type {string} - * @memberof ListFields200ResponseFieldsInner - */ - 'id'?: string; - /** - * Label of the field - * @type {string} - * @memberof ListFields200ResponseFieldsInner - */ - 'label'?: string; - /** - * Type of the values of the field - * @type {string} - * @memberof ListFields200ResponseFieldsInner - */ - 'data_type'?: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ListFields200ResponseFieldsInner - */ - 'data'?: { - [key: string]: any; - }; - /** - * Is this field required (true) or optional (false) - * @type {boolean} - * @memberof ListFields200ResponseFieldsInner - */ - 'required'?: boolean; - /** - * Type of objects this field gets associated with - * @type {string} - * @memberof ListFields200ResponseFieldsInner - */ - 'scope'?: string; -} -/** - * - * @export - * @interface ListForexResponse - */ -export interface ListForexResponse { - /** - * - * @type {{ [key: string]: number; }} - * @memberof ListForexResponse - */ - 'forex': { - [key: string]: number; - }; -} -/** - * - * @export - * @interface ListFraudReviews200Response - */ -export interface ListFraudReviews200Response { - /** - * - * @type {Array} - * @memberof ListFraudReviews200Response - */ - 'fraud_reviews': Array; -} -/** - * The fraud review associated with a reward. - * @export - * @interface ListFraudReviews200ResponseFraudReviewsInner - */ -export interface ListFraudReviews200ResponseFraudReviewsInner { - /** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @type {string} - * @memberof ListFraudReviews200ResponseFraudReviewsInner - */ - 'status'?: ListFraudReviews200ResponseFraudReviewsInnerStatusEnum; - /** - * The array may contain multiple reasons, depending on which rule(s) flagged the reward for review. Reasons can be any of the following: * `Disallowed IP` * `Disallowed email` * `Disallowed country` * `Over reward dollar limit` * `Over reward count limit` * `VPN detected` * `Device related to multiple emails` * `Device or account related to multiple emails` * `IP on a Tremendous fraud list` * `Bank account on a Tremendous fraud list` * `Fingerprint on a Tremendous fraud list` * `Email on a Tremendous fraud list` * `Phone on a Tremendous fraud list` * `IP related to a blocked reward` * `Bank account related to a blocked reward` * `Fingerprint related to a blocked reward` * `Email related to a blocked reward` * `Phone related to a blocked reward` * `Allowed IP` * `Allowed email` - * @type {Array} - * @memberof ListFraudReviews200ResponseFraudReviewsInner - */ - 'reasons'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInner} - * @memberof ListFraudReviews200ResponseFraudReviewsInner - */ - 'reward'?: ListRewards200ResponseRewardsInner; -} -export declare const ListFraudReviews200ResponseFraudReviewsInnerStatusEnum: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = typeof ListFraudReviews200ResponseFraudReviewsInnerStatusEnum[keyof typeof ListFraudReviews200ResponseFraudReviewsInnerStatusEnum]; -export declare const ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum: { - readonly DisallowedIp: "Disallowed IP"; - readonly DisallowedEmail: "Disallowed email"; - readonly DisallowedCountry: "Disallowed country"; - readonly OverRewardDollarLimit: "Over reward dollar limit"; - readonly OverRewardCountLimit: "Over reward count limit"; - readonly VpnDetected: "VPN detected"; - readonly DeviceRelatedToMultipleEmails: "Device related to multiple emails"; - readonly DeviceOrAccountRelatedToMultipleEmails: "Device or account related to multiple emails"; - readonly IpOnATremendousFraudList: "IP on a Tremendous fraud list"; - readonly BankAccountOnATremendousFraudList: "Bank account on a Tremendous fraud list"; - readonly FingerprintOnATremendousFraudList: "Fingerprint on a Tremendous fraud list"; - readonly EmailOnATremendousFraudList: "Email on a Tremendous fraud list"; - readonly PhoneOnATremendousFraudList: "Phone on a Tremendous fraud list"; - readonly IpRelatedToABlockedReward: "IP related to a blocked reward"; - readonly BankAccountRelatedToABlockedReward: "Bank account related to a blocked reward"; - readonly FingerprintRelatedToABlockedReward: "Fingerprint related to a blocked reward"; - readonly EmailRelatedToABlockedReward: "Email related to a blocked reward"; - readonly PhoneRelatedToABlockedReward: "Phone related to a blocked reward"; - readonly AllowedIp: "Allowed IP"; - readonly AllowedEmail: "Allowed email"; -}; -export type ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = typeof ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum[keyof typeof ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum]; -/** - * - * @export - * @interface ListFraudRules200Response - */ -export interface ListFraudRules200Response { - /** - * - * @type {Array} - * @memberof ListFraudRules200Response - */ - 'fraud_rules': Array; -} -/** - * An active fraud rule - * @export - * @interface ListFraudRules200ResponseFraudRulesInner - */ -export interface ListFraudRules200ResponseFraudRulesInner { - /** - * * `review_country` - Flags when the recipient\'s IP country matches the criteria in the rule * `review_ip` - Flags when recipient\'s IP matches one in the list * `review_email` - Flags when the recipient\'s email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config * `review_multiple_emails` - Flags when recipient\'s device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient\'s IP matches one in the list * `allow_email` - Releases a reward when the recipient\'s email matches one in the list - * @type {string} - * @memberof ListFraudRules200ResponseFraudRulesInner - */ - 'rule_type'?: ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum; - /** - * The configuration associated with the rule. The properties allowed depend on the type of rule. This property is only present for rules that require configuration. - * @type {object} - * @memberof ListFraudRules200ResponseFraudRulesInner - */ - 'config'?: object | null; -} -export declare const ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly ReviewRedeemedRewardsCount: "review_redeemed_rewards_count"; - readonly ReviewRedeemedRewardsAmount: "review_redeemed_rewards_amount"; - readonly ReviewMultipleEmails: "review_multiple_emails"; - readonly ReviewVpn: "review_vpn"; - readonly ReviewTremendousFlagList: "review_tremendous_flag_list"; - readonly ReviewPreviouslyBlockedRecipients: "review_previously_blocked_recipients"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = typeof ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum[keyof typeof ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum]; -/** - * - * @export - * @interface ListFundingSources200Response - */ -export interface ListFundingSources200Response { - /** - * - * @type {Array} - * @memberof ListFundingSources200Response - */ - 'funding_sources': Array; -} -/** - * - * @export - * @interface ListFundingSources200ResponseFundingSourcesInner - */ -export interface ListFundingSources200ResponseFundingSourcesInner { - /** - * - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInner - */ - 'id': string; - /** - * You can pay for rewards using different payment methods on Tremendous:
Payment Method Description
balance Pre-funded balance in your Tremendous account to draw funds from to send rewards to recipients.
bank_account Bank account to draw funds from to send rewards to recipients.
credit_card Credit card to draw funds from to send rewards to recipients.
invoice Send rewards to recipients and pay by invoice.
- * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInner - */ - 'method': ListFundingSources200ResponseFundingSourcesInnerMethodEnum; - /** - * **Only available when `method` is set to `invoice`.** - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInner - */ - 'type'?: ListFundingSources200ResponseFundingSourcesInnerTypeEnum; - /** - * - * @type {ListFundingSources200ResponseFundingSourcesInnerMeta} - * @memberof ListFundingSources200ResponseFundingSourcesInner - */ - 'meta': ListFundingSources200ResponseFundingSourcesInnerMeta; -} -export declare const ListFundingSources200ResponseFundingSourcesInnerMethodEnum: { - readonly Balance: "balance"; - readonly BankAccount: "bank_account"; - readonly CreditCard: "credit_card"; - readonly Invoice: "invoice"; -}; -export type ListFundingSources200ResponseFundingSourcesInnerMethodEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMethodEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMethodEnum]; -export declare const ListFundingSources200ResponseFundingSourcesInnerTypeEnum: { - readonly Commercial: "COMMERCIAL"; - readonly ProForma: "PRO_FORMA"; - readonly PrefundingOnly: "PREFUNDING_ONLY"; -}; -export type ListFundingSources200ResponseFundingSourcesInnerTypeEnum = typeof ListFundingSources200ResponseFundingSourcesInnerTypeEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerTypeEnum]; -/** - * - * @export - * @interface ListFundingSources200ResponseFundingSourcesInnerMeta - */ -export interface ListFundingSources200ResponseFundingSourcesInnerMeta { - /** - * **Only available when `method` is set to `balance`.** Available amount for this funding source (in Cents USD) - * @type {number} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'available_cents'?: number; - /** - * **Only available when `method` is set to `balance`.** Funds that are already registered on your Tremendous account but which have not yet been deposited in your account (e.g. unpaid invoices) (in Cents USD). - * @type {number} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'pending_cents'?: number; - /** - * **Only available when `method` is set to `bank_account` or `credit_card`.** Name of the holder of the bank account or credit_card - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'accountholder_name'?: string; - /** - * **Only available when `method` is set to `bank_account`.** Is this a checking or savings account - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'account_type'?: ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum; - /** - * **Only available when `method` is set to `bank_account`.** Name of the bank - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'bank_name'?: string | null; - /** - * **Only available when `method` is set to `bank_account`.** Last 4 digits of the account number - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'account_number_mask'?: string; - /** - * **Only available when `method` is set to `bank_account`.** Last 4 digits of the routing number - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'account_routing_mask'?: string; - /** - * **Only available when `method` is set to `bank_account`.** Can refunds be deposited to this bank account - * @type {boolean} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'refundable'?: boolean; - /** - * **Only available when `method` is set to `credit_card`.** Network of the credit card - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'network'?: ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum; - /** - * **Only available when `method` is set to `credit_card`.** Last 4 digits of the credit card number - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'last4'?: string; - /** - * **Only available when `method` is set to `credit_card`.** Is this credit card expired - * @type {boolean} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'expired'?: boolean; - /** - * **Only available when `method` is set to `bank_account` or `credit_card`.** Point in time when the last order failed using this bank account or credit card as a funding source. - * @type {string} - * @memberof ListFundingSources200ResponseFundingSourcesInnerMeta - */ - 'last_payment_failed_at'?: string | null; -} -export declare const ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum: { - readonly Checking: "checking"; - readonly Savings: "savings"; -}; -export type ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum]; -export declare const ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum: { - readonly MasterCard: "MasterCard"; - readonly Amex: "Amex"; - readonly Jcb: "JCB"; - readonly DinersClub: "Diner's Club"; - readonly Visa: "visa"; - readonly Discover: "discover"; - readonly Laser: "laser"; - readonly Elo: "elo"; - readonly Maestro: "maestro"; - readonly Solo: "solo"; -}; -export type ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum]; -/** - * - * @export - * @interface ListInvoices200Response - */ -export interface ListInvoices200Response { - /** - * - * @type {Array} - * @memberof ListInvoices200Response - */ - 'invoices': Array; - /** - * The total number of invoices across all pages - * @type {number} - * @memberof ListInvoices200Response - */ - 'total_count': number; -} -/** - * Invoices are instruments to fund your Tremendous account\'s balance. Invoices can be created by your organization programatically. Once we receive your payment, the invoice is marked as `PAID` and we add the respective funds to your account\'s balance. - * @export - * @interface ListInvoices200ResponseInvoicesInner - */ -export interface ListInvoices200ResponseInvoicesInner { - /** - * The invoice number - * @type {string} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'id': string; - /** - * Reference to the purchase order number within your organization - * @type {string} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'po_number'?: string | null; - /** - * Amount of the invoice in USD - * @type {number} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'amount': number; - /** - * Status of this invoice
Status Description
DELETED Invoice has been deleted by your organization
PAID Invoice has been paid by your organization
OPEN Invoice has been created by your organization but has not been paid, yet
- * @type {string} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'status': ListInvoices200ResponseInvoicesInnerStatusEnum; - /** - * List of orders related to the invoice (it doesn\'t apply to prefunding) - * @type {Array} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'orders'?: Array; - /** - * List of rewards related to the invoice (it doesn\'t apply to prefunding) - * @type {Array} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'rewards'?: Array; - /** - * Timestamp of when the invoice has been created. - * @type {string} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'created_at': string; - /** - * Timestamp of when the invoice has been paid. - * @type {string} - * @memberof ListInvoices200ResponseInvoicesInner - */ - 'paid_at': string | null; -} -export declare const ListInvoices200ResponseInvoicesInnerStatusEnum: { - readonly Deleted: "DELETED"; - readonly Paid: "PAID"; - readonly Open: "OPEN"; - readonly MarkedAsPaid: "MARKED_AS_PAID"; -}; -export type ListInvoices200ResponseInvoicesInnerStatusEnum = typeof ListInvoices200ResponseInvoicesInnerStatusEnum[keyof typeof ListInvoices200ResponseInvoicesInnerStatusEnum]; -/** - * - * @export - * @interface ListMembers200Response - */ -export interface ListMembers200Response { - /** - * - * @type {Array} - * @memberof ListMembers200Response - */ - 'members': Array; -} -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface ListMembers200ResponseMembersInner - */ -export interface ListMembers200ResponseMembersInner { - /** - * - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof ListMembers200ResponseMembersInner - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'status': ListMembers200ResponseMembersInnerStatusEnum; - /** - * Timestamp when this member was created. The `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members). - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'created_at'?: string; - /** - * Timestamp when this member most recently logged into the dashboard of the organization associated with this API key. - * @type {string} - * @memberof ListMembers200ResponseMembersInner - */ - 'last_login_at'?: string | null; -} -export declare const ListMembers200ResponseMembersInnerStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type ListMembers200ResponseMembersInnerStatusEnum = typeof ListMembers200ResponseMembersInnerStatusEnum[keyof typeof ListMembers200ResponseMembersInnerStatusEnum]; -/** - * - * @export - * @interface ListOrders200Response - */ -export interface ListOrders200Response { - /** - * - * @type {Array} - * @memberof ListOrders200Response - */ - 'orders': Array; - /** - * The total number of orders across all pages - * @type {number} - * @memberof ListOrders200Response - */ - 'total_count': number; -} -/** - * An order wraps around the fulfilment of one or more rewards. - * @export - * @interface ListOrders200ResponseOrdersInner - */ -export interface ListOrders200ResponseOrdersInner { - /** - * Tremendous ID of the order - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'id': string; - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'external_id'?: string | null; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'campaign_id'?: string | null; - /** - * Date the order has been created - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'created_at': string; - /** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'status': ListOrders200ResponseOrdersInnerStatusEnum; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'channel'?: ListOrders200ResponseOrdersInnerChannelEnum; - /** - * - * @type {ListOrders200ResponseOrdersInnerPayment} - * @memberof ListOrders200ResponseOrdersInner - */ - 'payment'?: ListOrders200ResponseOrdersInnerPayment; - /** - * The ID for the invoice associated with this order - * @type {string} - * @memberof ListOrders200ResponseOrdersInner - */ - 'invoice_id'?: string; - /** - * - * @type {Array} - * @memberof ListOrders200ResponseOrdersInner - */ - 'rewards'?: Array; -} -export declare const ListOrders200ResponseOrdersInnerStatusEnum: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type ListOrders200ResponseOrdersInnerStatusEnum = typeof ListOrders200ResponseOrdersInnerStatusEnum[keyof typeof ListOrders200ResponseOrdersInnerStatusEnum]; -export declare const ListOrders200ResponseOrdersInnerChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type ListOrders200ResponseOrdersInnerChannelEnum = typeof ListOrders200ResponseOrdersInnerChannelEnum[keyof typeof ListOrders200ResponseOrdersInnerChannelEnum]; -/** - * Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards. Note that this property will only appear for processed orders (`status` is `EXECUTED`). - * @export - * @interface ListOrders200ResponseOrdersInnerPayment - */ -export interface ListOrders200ResponseOrdersInnerPayment { - /** - * Total price of the order before fees (in USD) - * @type {number} - * @memberof ListOrders200ResponseOrdersInnerPayment - */ - 'subtotal'?: number; - /** - * Total price of the order including fees (in USD) - * @type {number} - * @memberof ListOrders200ResponseOrdersInnerPayment - */ - 'total'?: number; - /** - * Fees for the order (in USD) - * @type {number} - * @memberof ListOrders200ResponseOrdersInnerPayment - */ - 'fees'?: number; - /** - * - * @type {ListOrders200ResponseOrdersInnerPaymentRefund} - * @memberof ListOrders200ResponseOrdersInnerPayment - */ - 'refund'?: ListOrders200ResponseOrdersInnerPaymentRefund; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof ListOrders200ResponseOrdersInnerPayment - */ - 'channel'?: ListOrders200ResponseOrdersInnerPaymentChannelEnum; -} -export declare const ListOrders200ResponseOrdersInnerPaymentChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type ListOrders200ResponseOrdersInnerPaymentChannelEnum = typeof ListOrders200ResponseOrdersInnerPaymentChannelEnum[keyof typeof ListOrders200ResponseOrdersInnerPaymentChannelEnum]; -/** - * Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards). Note that this property will only appear for canceled orders or orders with canceled rewards. - * @export - * @interface ListOrders200ResponseOrdersInnerPaymentRefund - */ -export interface ListOrders200ResponseOrdersInnerPaymentRefund { - /** - * Total amount of the order refunds (in USD) - * @type {number} - * @memberof ListOrders200ResponseOrdersInnerPaymentRefund - */ - 'total': number; -} -/** - * - * @export - * @interface ListOrganizations200Response - */ -export interface ListOrganizations200Response { - /** - * - * @type {Array} - * @memberof ListOrganizations200Response - */ - 'organizations'?: Array; -} -/** - * Organizations are a way to separate different parts of your business within the same Tremendous account. Your root Tremendous account is an organization itself and can have multiple sub-organizations. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. Each organizations can have it\'s own API key. - * @export - * @interface ListOrganizations200ResponseOrganizationsInner - */ -export interface ListOrganizations200ResponseOrganizationsInner { - /** - * - * @type {string} - * @memberof ListOrganizations200ResponseOrganizationsInner - */ - 'id'?: string; - /** - * Name of the organization - * @type {string} - * @memberof ListOrganizations200ResponseOrganizationsInner - */ - 'name': string; - /** - * URL of the website of that organization - * @type {string} - * @memberof ListOrganizations200ResponseOrganizationsInner - */ - 'website': string; - /** - * Status of the organization. Organizations need to be approved to be able to use them to send out rewards. - * @type {string} - * @memberof ListOrganizations200ResponseOrganizationsInner - */ - 'status'?: ListOrganizations200ResponseOrganizationsInnerStatusEnum; - /** - * Timestamp of when the organization has been created. *This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations. - * @type {string} - * @memberof ListOrganizations200ResponseOrganizationsInner - */ - 'created_at'?: string; -} -export declare const ListOrganizations200ResponseOrganizationsInnerStatusEnum: { - readonly Pending: "PENDING"; - readonly Approved: "APPROVED"; - readonly Rejected: "REJECTED"; -}; -export type ListOrganizations200ResponseOrganizationsInnerStatusEnum = typeof ListOrganizations200ResponseOrganizationsInnerStatusEnum[keyof typeof ListOrganizations200ResponseOrganizationsInnerStatusEnum]; -/** - * - * @export - * @interface ListProductsResponse - */ -export interface ListProductsResponse { - /** - * - * @type {Array} - * @memberof ListProductsResponse - */ - 'products': Array; -} -/** - * A product represents one way to payout a reward to it\'s recipient. Think: * Amazon.com gift card (ID: `OKMHM2X2OHYV`) * Donations to Save the Children (ID: `ESRNAD533W5A`) * Virtual Visa debit card (ID: `Q24BD9EZ332JT`) each of which is one specific product on Tremendous. > 📘 All available products > > See this [list](https://www.tremendous.com/catalog) Products can be limited in their availability to recipients by * geography (field `countries`) * currency (field `currencies`) * amount of the reward (field `skus`) * e.g. adidas gift cards accept any amount between 5 and 200 USD. See the description of each respective parameter for further details. - * @export - * @interface ListProductsResponseProductsInner - */ -export interface ListProductsResponseProductsInner { - /** - * - * @type {string} - * @memberof ListProductsResponseProductsInner - */ - 'id': string; - /** - * Name of the product - * @type {string} - * @memberof ListProductsResponseProductsInner - */ - 'name': string; - /** - * Detailed description of the product. Mostly used for products with a `category` of `charities`. - * @type {string} - * @memberof ListProductsResponseProductsInner - */ - 'description': string; - /** - * The category of this product
Category Description
ach Bank transfer to the recipient
charity Donations to a charity
merchant_card A gift card for a certain merchant (e.g. Amazon)
paypal Payout via PayPal
venmo Payout via Venmo
visa_card Payout in form of a Visa debit card
- * @type {string} - * @memberof ListProductsResponseProductsInner - */ - 'category': ListProductsResponseProductsInnerCategoryEnum; - /** - * Legal disclosures for this product. Can be in HTML format. - * @type {string} - * @memberof ListProductsResponseProductsInner - */ - 'disclosure': string; - /** - * Products may are restricted in their usage based on the amount of the reward. The `skus` array defines bands of denominations in which this product may be used for payouts. - * @type {Array} - * @memberof ListProductsResponseProductsInner - */ - 'skus'?: Array; - /** - * Available currencies for this product - * @type {Array} - * @memberof ListProductsResponseProductsInner - */ - 'currency_codes': Array; - /** - * List of countries in which this product is available to recipients. - * @type {Array} - * @memberof ListProductsResponseProductsInner - */ - 'countries': Array; - /** - * List of product images associated with this product (e.g. logos or images of the gift cards) - * @type {Array} - * @memberof ListProductsResponseProductsInner - */ - 'images': Array; -} -export declare const ListProductsResponseProductsInnerCategoryEnum: { - readonly Ach: "ach"; - readonly Charity: "charity"; - readonly MerchantCard: "merchant_card"; - readonly Paypal: "paypal"; - readonly Venmo: "venmo"; - readonly VisaCard: "visa_card"; -}; -export type ListProductsResponseProductsInnerCategoryEnum = typeof ListProductsResponseProductsInnerCategoryEnum[keyof typeof ListProductsResponseProductsInnerCategoryEnum]; -export declare const ListProductsResponseProductsInnerCurrencyCodesEnum: { - readonly Usd: "USD"; - readonly Cad: "CAD"; - readonly Eur: "EUR"; - readonly Aed: "AED"; - readonly Afn: "AFN"; - readonly All: "ALL"; - readonly Amd: "AMD"; - readonly Ars: "ARS"; - readonly Aud: "AUD"; - readonly Azn: "AZN"; - readonly Bam: "BAM"; - readonly Bdt: "BDT"; - readonly Bgn: "BGN"; - readonly Bhd: "BHD"; - readonly Bif: "BIF"; - readonly Bnd: "BND"; - readonly Bob: "BOB"; - readonly Brl: "BRL"; - readonly Bwp: "BWP"; - readonly Byr: "BYR"; - readonly Bzd: "BZD"; - readonly Cdf: "CDF"; - readonly Chf: "CHF"; - readonly Clp: "CLP"; - readonly Cny: "CNY"; - readonly Cop: "COP"; - readonly Crc: "CRC"; - readonly Cve: "CVE"; - readonly Czk: "CZK"; - readonly Djf: "DJF"; - readonly Dkk: "DKK"; - readonly Dop: "DOP"; - readonly Dzd: "DZD"; - readonly Eek: "EEK"; - readonly Egp: "EGP"; - readonly Ern: "ERN"; - readonly Etb: "ETB"; - readonly Gbp: "GBP"; - readonly Gel: "GEL"; - readonly Ghs: "GHS"; - readonly Gnf: "GNF"; - readonly Gtq: "GTQ"; - readonly Hkd: "HKD"; - readonly Hnl: "HNL"; - readonly Hrk: "HRK"; - readonly Huf: "HUF"; - readonly Idr: "IDR"; - readonly Ils: "ILS"; - readonly Inr: "INR"; - readonly Iqd: "IQD"; - readonly Irr: "IRR"; - readonly Isk: "ISK"; - readonly Jmd: "JMD"; - readonly Jod: "JOD"; - readonly Jpy: "JPY"; - readonly Kes: "KES"; - readonly Khr: "KHR"; - readonly Krw: "KRW"; - readonly Kwd: "KWD"; - readonly Kzt: "KZT"; - readonly Lbp: "LBP"; - readonly Lkr: "LKR"; - readonly Ltl: "LTL"; - readonly Lvl: "LVL"; - readonly Mad: "MAD"; - readonly Mdl: "MDL"; - readonly Mga: "MGA"; - readonly Mkd: "MKD"; - readonly Mmk: "MMK"; - readonly Mop: "MOP"; - readonly Mur: "MUR"; - readonly Mxn: "MXN"; - readonly Myr: "MYR"; - readonly Mzn: "MZN"; - readonly Nad: "NAD"; - readonly Ngn: "NGN"; - readonly Nio: "NIO"; - readonly Nok: "NOK"; - readonly Npr: "NPR"; - readonly Nzd: "NZD"; - readonly Omr: "OMR"; - readonly Pab: "PAB"; - readonly Pen: "PEN"; - readonly Php: "PHP"; - readonly Pkr: "PKR"; - readonly Pln: "PLN"; - readonly Pyg: "PYG"; - readonly Qar: "QAR"; - readonly Ron: "RON"; - readonly Rsd: "RSD"; - readonly Rub: "RUB"; - readonly Rwf: "RWF"; - readonly Sar: "SAR"; - readonly Sdg: "SDG"; - readonly Sek: "SEK"; - readonly Sgd: "SGD"; - readonly Sos: "SOS"; - readonly Syp: "SYP"; - readonly Thb: "THB"; - readonly Tnd: "TND"; - readonly Top: "TOP"; - readonly Try: "TRY"; - readonly Ttd: "TTD"; - readonly Twd: "TWD"; - readonly Tzs: "TZS"; - readonly Uah: "UAH"; - readonly Ugx: "UGX"; - readonly Uyu: "UYU"; - readonly Uzs: "UZS"; - readonly Vef: "VEF"; - readonly Vnd: "VND"; - readonly Xaf: "XAF"; - readonly Xof: "XOF"; - readonly Yer: "YER"; - readonly Zar: "ZAR"; - readonly Zmk: "ZMK"; -}; -export type ListProductsResponseProductsInnerCurrencyCodesEnum = typeof ListProductsResponseProductsInnerCurrencyCodesEnum[keyof typeof ListProductsResponseProductsInnerCurrencyCodesEnum]; -/** - * - * @export - * @interface ListProductsResponseProductsInnerCountriesInner - */ -export interface ListProductsResponseProductsInnerCountriesInner { - /** - * ISO 3166 country code - * @type {string} - * @memberof ListProductsResponseProductsInnerCountriesInner - */ - 'abbr': string; -} -/** - * - * @export - * @interface ListProductsResponseProductsInnerImagesInner - */ -export interface ListProductsResponseProductsInnerImagesInner { - /** - * URL to this image - * @type {string} - * @memberof ListProductsResponseProductsInnerImagesInner - */ - 'src': string; - /** - * Type of image - * @type {string} - * @memberof ListProductsResponseProductsInnerImagesInner - */ - 'type': ListProductsResponseProductsInnerImagesInnerTypeEnum; -} -export declare const ListProductsResponseProductsInnerImagesInnerTypeEnum: { - readonly Card: "card"; - readonly Logo: "logo"; -}; -export type ListProductsResponseProductsInnerImagesInnerTypeEnum = typeof ListProductsResponseProductsInnerImagesInnerTypeEnum[keyof typeof ListProductsResponseProductsInnerImagesInnerTypeEnum]; -/** - * - * @export - * @interface ListProductsResponseProductsInnerSkusInner - */ -export interface ListProductsResponseProductsInnerSkusInner { - /** - * Minimal denomination that this product supports (in the product\'s currency) - * @type {number} - * @memberof ListProductsResponseProductsInnerSkusInner - */ - 'min': number; - /** - * Maximum denomination that this product supports (in the product\'s currency) - * @type {number} - * @memberof ListProductsResponseProductsInnerSkusInner - */ - 'max': number; -} -/** - * - * @export - * @interface ListRewards200Response - */ -export interface ListRewards200Response { - /** - * - * @type {Array} - * @memberof ListRewards200Response - */ - 'rewards'?: Array; - /** - * The total number of rewards across all pages - * @type {number} - * @memberof ListRewards200Response - */ - 'total_count'?: number; -} -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface ListRewards200ResponseRewardsInner - */ -export interface ListRewards200ResponseRewardsInner { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof ListRewards200ResponseRewardsInner - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof ListRewards200ResponseRewardsInner - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof ListRewards200ResponseRewardsInner - */ - 'created_at'?: string; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof ListRewards200ResponseRewardsInner - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof ListRewards200ResponseRewardsInner - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof ListRewards200ResponseRewardsInner - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof ListRewards200ResponseRewardsInner - */ - 'custom_fields'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerDelivery} - * @memberof ListRewards200ResponseRewardsInner - */ - 'delivery'?: ListRewards200ResponseRewardsInnerDelivery; -} -/** - * Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).) - * @export - * @interface ListRewards200ResponseRewardsInnerCustomFieldsInner - */ -export interface ListRewards200ResponseRewardsInnerCustomFieldsInner { - /** - * Tremendous ID of the custom field - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerCustomFieldsInner - */ - 'id'?: string; - /** - * Value of the custom field - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerCustomFieldsInner - */ - 'value'?: string | null; - /** - * Label of the custom field - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerCustomFieldsInner - */ - 'label'?: string; -} -/** - * Details on how the reward is delivered to the recipient. - * @export - * @interface ListRewards200ResponseRewardsInnerDelivery - */ -export interface ListRewards200ResponseRewardsInnerDelivery { - /** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @type {string} - * @memberof ListRewards200ResponseRewardsInnerDelivery - */ - 'method': ListRewards200ResponseRewardsInnerDeliveryMethodEnum; - /** - * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled. - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerDelivery - */ - 'status': ListRewards200ResponseRewardsInnerDeliveryStatusEnum; -} -export declare const ListRewards200ResponseRewardsInnerDeliveryMethodEnum: { - readonly Email: "EMAIL"; - readonly Link: "LINK"; - readonly Phone: "PHONE"; -}; -export type ListRewards200ResponseRewardsInnerDeliveryMethodEnum = typeof ListRewards200ResponseRewardsInnerDeliveryMethodEnum[keyof typeof ListRewards200ResponseRewardsInnerDeliveryMethodEnum]; -export declare const ListRewards200ResponseRewardsInnerDeliveryStatusEnum: { - readonly Scheduled: "SCHEDULED"; - readonly Failed: "FAILED"; - readonly Succeeded: "SUCCEEDED"; - readonly Pending: "PENDING"; -}; -export type ListRewards200ResponseRewardsInnerDeliveryStatusEnum = typeof ListRewards200ResponseRewardsInnerDeliveryStatusEnum[keyof typeof ListRewards200ResponseRewardsInnerDeliveryStatusEnum]; -/** - * Details of the recipient of the reward - * @export - * @interface ListRewards200ResponseRewardsInnerRecipient - */ -export interface ListRewards200ResponseRewardsInnerRecipient { - /** - * Name of the recipient - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerRecipient - */ - 'name'?: string; - /** - * Email address of the recipient - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerRecipient - */ - 'email'?: string; - /** - * Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +). - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerRecipient - */ - 'phone'?: string; -} -/** - * - * @export - * @interface ListRewards200ResponseRewardsInnerValue - */ -export interface ListRewards200ResponseRewardsInnerValue { - /** - * Amount of the reward - * @type {number} - * @memberof ListRewards200ResponseRewardsInnerValue - */ - 'denomination': number; - /** - * Currency of the reward - * @type {string} - * @memberof ListRewards200ResponseRewardsInnerValue - */ - 'currency_code'?: ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum; -} -export declare const ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum: { - readonly Usd: "USD"; - readonly Cad: "CAD"; - readonly Eur: "EUR"; - readonly Aed: "AED"; - readonly Afn: "AFN"; - readonly All: "ALL"; - readonly Amd: "AMD"; - readonly Ars: "ARS"; - readonly Aud: "AUD"; - readonly Azn: "AZN"; - readonly Bam: "BAM"; - readonly Bdt: "BDT"; - readonly Bgn: "BGN"; - readonly Bhd: "BHD"; - readonly Bif: "BIF"; - readonly Bnd: "BND"; - readonly Bob: "BOB"; - readonly Brl: "BRL"; - readonly Bwp: "BWP"; - readonly Byr: "BYR"; - readonly Bzd: "BZD"; - readonly Cdf: "CDF"; - readonly Chf: "CHF"; - readonly Clp: "CLP"; - readonly Cny: "CNY"; - readonly Cop: "COP"; - readonly Crc: "CRC"; - readonly Cve: "CVE"; - readonly Czk: "CZK"; - readonly Djf: "DJF"; - readonly Dkk: "DKK"; - readonly Dop: "DOP"; - readonly Dzd: "DZD"; - readonly Eek: "EEK"; - readonly Egp: "EGP"; - readonly Ern: "ERN"; - readonly Etb: "ETB"; - readonly Gbp: "GBP"; - readonly Gel: "GEL"; - readonly Ghs: "GHS"; - readonly Gnf: "GNF"; - readonly Gtq: "GTQ"; - readonly Hkd: "HKD"; - readonly Hnl: "HNL"; - readonly Hrk: "HRK"; - readonly Huf: "HUF"; - readonly Idr: "IDR"; - readonly Ils: "ILS"; - readonly Inr: "INR"; - readonly Iqd: "IQD"; - readonly Irr: "IRR"; - readonly Isk: "ISK"; - readonly Jmd: "JMD"; - readonly Jod: "JOD"; - readonly Jpy: "JPY"; - readonly Kes: "KES"; - readonly Khr: "KHR"; - readonly Krw: "KRW"; - readonly Kwd: "KWD"; - readonly Kzt: "KZT"; - readonly Lbp: "LBP"; - readonly Lkr: "LKR"; - readonly Ltl: "LTL"; - readonly Lvl: "LVL"; - readonly Mad: "MAD"; - readonly Mdl: "MDL"; - readonly Mga: "MGA"; - readonly Mkd: "MKD"; - readonly Mmk: "MMK"; - readonly Mop: "MOP"; - readonly Mur: "MUR"; - readonly Mxn: "MXN"; - readonly Myr: "MYR"; - readonly Mzn: "MZN"; - readonly Nad: "NAD"; - readonly Ngn: "NGN"; - readonly Nio: "NIO"; - readonly Nok: "NOK"; - readonly Npr: "NPR"; - readonly Nzd: "NZD"; - readonly Omr: "OMR"; - readonly Pab: "PAB"; - readonly Pen: "PEN"; - readonly Php: "PHP"; - readonly Pkr: "PKR"; - readonly Pln: "PLN"; - readonly Pyg: "PYG"; - readonly Qar: "QAR"; - readonly Ron: "RON"; - readonly Rsd: "RSD"; - readonly Rub: "RUB"; - readonly Rwf: "RWF"; - readonly Sar: "SAR"; - readonly Sdg: "SDG"; - readonly Sek: "SEK"; - readonly Sgd: "SGD"; - readonly Sos: "SOS"; - readonly Syp: "SYP"; - readonly Thb: "THB"; - readonly Tnd: "TND"; - readonly Top: "TOP"; - readonly Try: "TRY"; - readonly Ttd: "TTD"; - readonly Twd: "TWD"; - readonly Tzs: "TZS"; - readonly Uah: "UAH"; - readonly Ugx: "UGX"; - readonly Uyu: "UYU"; - readonly Uzs: "UZS"; - readonly Vef: "VEF"; - readonly Vnd: "VND"; - readonly Xaf: "XAF"; - readonly Xof: "XOF"; - readonly Yer: "YER"; - readonly Zar: "ZAR"; - readonly Zmk: "ZMK"; -}; -export type ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = typeof ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum[keyof typeof ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum]; -/** - * - * @export - * @interface ListRewards401Response - */ -export interface ListRewards401Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof ListRewards401Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface ListRewards401ResponseErrors - */ -export interface ListRewards401ResponseErrors { - /** - * Error message - * @type {string} - * @memberof ListRewards401ResponseErrors - */ - 'message'?: string; - /** - * Mirrors the request parameters structure, filled only with the (nested) properties that caused an error. - * @type {object} - * @memberof ListRewards401ResponseErrors - */ - 'payload'?: object; -} -/** - * - * @export - * @interface ListRewards429Response - */ -export interface ListRewards429Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof ListRewards429Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * - * @export - * @interface ListRoles200Response - */ -export interface ListRoles200Response { - /** - * - * @type {Array} - * @memberof ListRoles200Response - */ - 'roles': Array; -} -/** - * Each organization member is assigned a role that defines the permissions they have within the organization. - * @export - * @interface ListRoles200ResponseRolesInner - */ -export interface ListRoles200ResponseRolesInner { - /** - * - * @type {string} - * @memberof ListRoles200ResponseRolesInner - */ - 'id': string; - /** - * - * @type {string} - * @memberof ListRoles200ResponseRolesInner - */ - 'title': string; - /** - * - * @type {string} - * @memberof ListRoles200ResponseRolesInner - */ - 'description': string; -} -/** - * - * @export - * @interface ListWebhookEvents200Response - */ -export interface ListWebhookEvents200Response { - /** - * - * @type {Array} - * @memberof ListWebhookEvents200Response - */ - 'events'?: Array; -} -/** - * - * @export - * @interface ListWebhooks200Response - */ -export interface ListWebhooks200Response { - /** - * - * @type {Array} - * @memberof ListWebhooks200Response - */ - 'webhooks'?: Array; -} -/** - * - * @export - * @interface ListWebhooks200ResponseWebhooksInner - */ -export interface ListWebhooks200ResponseWebhooksInner { - /** - * - * @type {string} - * @memberof ListWebhooks200ResponseWebhooksInner - */ - 'id'?: string; - /** - * URL the webhook will make requests to - * @type {string} - * @memberof ListWebhooks200ResponseWebhooksInner - */ - 'url': string | null; - /** - * Private key for the webhook - * @type {string} - * @memberof ListWebhooks200ResponseWebhooksInner - */ - 'private_key'?: string; -} -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface Member - */ -export interface Member { - /** - * - * @type {string} - * @memberof Member - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof Member - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof Member - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof Member - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof Member - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof Member - */ - 'status': MemberStatusEnum; - /** - * Timestamp when this member was created. The `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members). - * @type {string} - * @memberof Member - */ - 'created_at'?: string; - /** - * Timestamp when this member most recently logged into the dashboard of the organization associated with this API key. - * @type {string} - * @memberof Member - */ - 'last_login_at'?: string | null; -} -export declare const MemberStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type MemberStatusEnum = typeof MemberStatusEnum[keyof typeof MemberStatusEnum]; -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface MemberBase - */ -export interface MemberBase { - /** - * - * @type {string} - * @memberof MemberBase - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof MemberBase - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof MemberBase - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof MemberBase - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof MemberBase - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof MemberBase - */ - 'status': MemberBaseStatusEnum; -} -export declare const MemberBaseStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type MemberBaseStatusEnum = typeof MemberBaseStatusEnum[keyof typeof MemberBaseStatusEnum]; -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface MemberWithEvents - */ -export interface MemberWithEvents { - /** - * - * @type {string} - * @memberof MemberWithEvents - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof MemberWithEvents - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof MemberWithEvents - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof MemberWithEvents - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof MemberWithEvents - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof MemberWithEvents - */ - 'status': MemberWithEventsStatusEnum; - /** - * List of events related to the member. - * @type {Array} - * @memberof MemberWithEvents - */ - 'events'?: Array; -} -export declare const MemberWithEventsStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type MemberWithEventsStatusEnum = typeof MemberWithEventsStatusEnum[keyof typeof MemberWithEventsStatusEnum]; -/** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. - * @export - * @interface MemberWithoutEvents - */ -export interface MemberWithoutEvents { - /** - * - * @type {string} - * @memberof MemberWithoutEvents - */ - 'id': string; - /** - * Email address of the member - * @type {string} - * @memberof MemberWithoutEvents - */ - 'email': string; - /** - * Full name of the member - * @type {string} - * @memberof MemberWithoutEvents - */ - 'name': string | null; - /** - * Is this member currently active in the organization. If `false`, the member will not be able to access the organization. - * @type {boolean} - * @memberof MemberWithoutEvents - */ - 'active'?: boolean; - /** - * The role ID associated with the member within the organization. - * @type {string} - * @memberof MemberWithoutEvents - */ - 'role'?: string | null; - /** - * Current status of the member\'s account. When creating a member it starts out in the status `INVITED`. As soon as that member open the invitation link and registers an account, the status switches to `REGISTERED`. - * @type {string} - * @memberof MemberWithoutEvents - */ - 'status': MemberWithoutEventsStatusEnum; - /** - * Timestamp when this member was created. The `created_at` timestamp is **NOT** returned when retrieving a member (but is part of the response when listing or creating members). - * @type {string} - * @memberof MemberWithoutEvents - */ - 'created_at'?: string; - /** - * Timestamp when this member most recently logged into the dashboard of the organization associated with this API key. - * @type {string} - * @memberof MemberWithoutEvents - */ - 'last_login_at'?: string | null; -} -export declare const MemberWithoutEventsStatusEnum: { - readonly Registered: "REGISTERED"; - readonly Invited: "INVITED"; -}; -export type MemberWithoutEventsStatusEnum = typeof MemberWithoutEventsStatusEnum[keyof typeof MemberWithoutEventsStatusEnum]; -/** - * An order wraps around the fulfilment of one or more rewards. - * @export - * @interface Order - */ -export interface Order { - /** - * Tremendous ID of the order - * @type {string} - * @memberof Order - */ - 'id': string; - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof Order - */ - 'external_id'?: string | null; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof Order - */ - 'campaign_id'?: string | null; - /** - * Date the order has been created - * @type {string} - * @memberof Order - */ - 'created_at': string; - /** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @type {string} - * @memberof Order - */ - 'status': OrderStatusEnum; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof Order - */ - 'channel'?: OrderChannelEnum; - /** - * - * @type {OrderBasePayment} - * @memberof Order - */ - 'payment'?: OrderBasePayment; - /** - * The ID for the invoice associated with this order - * @type {string} - * @memberof Order - */ - 'invoice_id'?: string; - /** - * - * @type {Array} - * @memberof Order - */ - 'rewards'?: Array; -} -export declare const OrderStatusEnum: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; -export declare const OrderChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type OrderChannelEnum = typeof OrderChannelEnum[keyof typeof OrderChannelEnum]; -/** - * An order wraps around the fulfilment of one or more rewards. - * @export - * @interface OrderBase - */ -export interface OrderBase { - /** - * Tremendous ID of the order - * @type {string} - * @memberof OrderBase - */ - 'id': string; - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof OrderBase - */ - 'external_id'?: string | null; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof OrderBase - */ - 'campaign_id'?: string | null; - /** - * Date the order has been created - * @type {string} - * @memberof OrderBase - */ - 'created_at': string; - /** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @type {string} - * @memberof OrderBase - */ - 'status': OrderBaseStatusEnum; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof OrderBase - */ - 'channel'?: OrderBaseChannelEnum; - /** - * - * @type {OrderBasePayment} - * @memberof OrderBase - */ - 'payment'?: OrderBasePayment; - /** - * The ID for the invoice associated with this order - * @type {string} - * @memberof OrderBase - */ - 'invoice_id'?: string; -} -export declare const OrderBaseStatusEnum: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type OrderBaseStatusEnum = typeof OrderBaseStatusEnum[keyof typeof OrderBaseStatusEnum]; -export declare const OrderBaseChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type OrderBaseChannelEnum = typeof OrderBaseChannelEnum[keyof typeof OrderBaseChannelEnum]; -/** - * Cost breakdown of the order (cost of rewards + fees). Cost and fees are always denominated in USD, independent from the currency of the ordered rewards. Note that this property will only appear for processed orders (`status` is `EXECUTED`). - * @export - * @interface OrderBasePayment - */ -export interface OrderBasePayment { - /** - * Total price of the order before fees (in USD) - * @type {number} - * @memberof OrderBasePayment - */ - 'subtotal'?: number; - /** - * Total price of the order including fees (in USD) - * @type {number} - * @memberof OrderBasePayment - */ - 'total'?: number; - /** - * Fees for the order (in USD) - * @type {number} - * @memberof OrderBasePayment - */ - 'fees'?: number; - /** - * - * @type {PaymentDetailsRefund} - * @memberof OrderBasePayment - */ - 'refund'?: PaymentDetailsRefund; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof OrderBasePayment - */ - 'channel'?: OrderBasePaymentChannelEnum; -} -export declare const OrderBasePaymentChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type OrderBasePaymentChannelEnum = typeof OrderBasePaymentChannelEnum[keyof typeof OrderBasePaymentChannelEnum]; -/** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @export - * @enum {string} - */ -export declare const OrderStatus: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus]; -/** - * An order wraps around the fulfilment of one or more rewards. - * @export - * @interface OrderWithoutLink - */ -export interface OrderWithoutLink { - /** - * Tremendous ID of the order - * @type {string} - * @memberof OrderWithoutLink - */ - 'id': string; - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof OrderWithoutLink - */ - 'external_id'?: string | null; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof OrderWithoutLink - */ - 'campaign_id'?: string | null; - /** - * Date the order has been created - * @type {string} - * @memberof OrderWithoutLink - */ - 'created_at': string; - /** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @type {string} - * @memberof OrderWithoutLink - */ - 'status': OrderWithoutLinkStatusEnum; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof OrderWithoutLink - */ - 'channel'?: OrderWithoutLinkChannelEnum; - /** - * - * @type {OrderBasePayment} - * @memberof OrderWithoutLink - */ - 'payment'?: OrderBasePayment; - /** - * The ID for the invoice associated with this order - * @type {string} - * @memberof OrderWithoutLink - */ - 'invoice_id'?: string; - /** - * - * @type {Array} - * @memberof OrderWithoutLink - */ - 'rewards'?: Array; -} -export declare const OrderWithoutLinkStatusEnum: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type OrderWithoutLinkStatusEnum = typeof OrderWithoutLinkStatusEnum[keyof typeof OrderWithoutLinkStatusEnum]; -export declare const OrderWithoutLinkChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type OrderWithoutLinkChannelEnum = typeof OrderWithoutLinkChannelEnum[keyof typeof OrderWithoutLinkChannelEnum]; -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface OrderWithoutLinkRewardsInner - */ -export interface OrderWithoutLinkRewardsInner { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof OrderWithoutLinkRewardsInner - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof OrderWithoutLinkRewardsInner - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof OrderWithoutLinkRewardsInner - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof OrderWithoutLinkRewardsInner - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof OrderWithoutLinkRewardsInner - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof OrderWithoutLinkRewardsInner - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof OrderWithoutLinkRewardsInner - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof OrderWithoutLinkRewardsInner - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof OrderWithoutLinkRewardsInner - */ - 'custom_fields'?: Array; - /** - * - * @type {RewardWithoutLinkDelivery} - * @memberof OrderWithoutLinkRewardsInner - */ - 'delivery'?: RewardWithoutLinkDelivery; -} -/** - * Organizations are a way to separate different parts of your business within the same Tremendous account. Your root Tremendous account is an organization itself and can have multiple sub-organizations. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. Each organizations can have it\'s own API key. - * @export - * @interface Organization - */ -export interface Organization { - /** - * - * @type {string} - * @memberof Organization - */ - 'id'?: string; - /** - * Name of the organization - * @type {string} - * @memberof Organization - */ - 'name': string; - /** - * URL of the website of that organization - * @type {string} - * @memberof Organization - */ - 'website': string; - /** - * Status of the organization. Organizations need to be approved to be able to use them to send out rewards. - * @type {string} - * @memberof Organization - */ - 'status'?: OrganizationStatusEnum; - /** - * Timestamp of when the organization has been created. *This field is only returned when creating an organization.* It is not returned anymore when retrieving or listing organizations. - * @type {string} - * @memberof Organization - */ - 'created_at'?: string; -} -export declare const OrganizationStatusEnum: { - readonly Pending: "PENDING"; - readonly Approved: "APPROVED"; - readonly Rejected: "REJECTED"; -}; -export type OrganizationStatusEnum = typeof OrganizationStatusEnum[keyof typeof OrganizationStatusEnum]; -/** - * - * @export - * @interface PaymentDetails - */ -export interface PaymentDetails { - /** - * Total price of the order before fees (in USD) - * @type {number} - * @memberof PaymentDetails - */ - 'subtotal'?: number; - /** - * Total price of the order including fees (in USD) - * @type {number} - * @memberof PaymentDetails - */ - 'total'?: number; - /** - * Fees for the order (in USD) - * @type {number} - * @memberof PaymentDetails - */ - 'fees'?: number; - /** - * - * @type {PaymentDetailsRefund} - * @memberof PaymentDetails - */ - 'refund'?: PaymentDetailsRefund; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof PaymentDetails - */ - 'channel'?: PaymentDetailsChannelEnum; -} -export declare const PaymentDetailsChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type PaymentDetailsChannelEnum = typeof PaymentDetailsChannelEnum[keyof typeof PaymentDetailsChannelEnum]; -/** - * Breakdown of the order refunds (total amount in USD, independent from the currency of the ordered rewards). Note that this property will only appear for canceled orders or orders with canceled rewards. - * @export - * @interface PaymentDetailsRefund - */ -export interface PaymentDetailsRefund { - /** - * Total amount of the order refunds (in USD) - * @type {number} - * @memberof PaymentDetailsRefund - */ - 'total': number; -} -/** - * A product represents one way to payout a reward to it\'s recipient. Think: * Amazon.com gift card (ID: `OKMHM2X2OHYV`) * Donations to Save the Children (ID: `ESRNAD533W5A`) * Virtual Visa debit card (ID: `Q24BD9EZ332JT`) each of which is one specific product on Tremendous. > 📘 All available products > > See this [list](https://www.tremendous.com/catalog) Products can be limited in their availability to recipients by * geography (field `countries`) * currency (field `currencies`) * amount of the reward (field `skus`) * e.g. adidas gift cards accept any amount between 5 and 200 USD. See the description of each respective parameter for further details. - * @export - * @interface Product - */ -export interface Product { - /** - * - * @type {string} - * @memberof Product - */ - 'id': string; - /** - * Name of the product - * @type {string} - * @memberof Product - */ - 'name': string; - /** - * Detailed description of the product. Mostly used for products with a `category` of `charities`. - * @type {string} - * @memberof Product - */ - 'description': string; - /** - * The category of this product
Category Description
ach Bank transfer to the recipient
charity Donations to a charity
merchant_card A gift card for a certain merchant (e.g. Amazon)
paypal Payout via PayPal
venmo Payout via Venmo
visa_card Payout in form of a Visa debit card
- * @type {string} - * @memberof Product - */ - 'category': ProductCategoryEnum; - /** - * Legal disclosures for this product. Can be in HTML format. - * @type {string} - * @memberof Product - */ - 'disclosure': string; - /** - * Products may are restricted in their usage based on the amount of the reward. The `skus` array defines bands of denominations in which this product may be used for payouts. - * @type {Array} - * @memberof Product - */ - 'skus'?: Array; - /** - * Available currencies for this product - * @type {Array} - * @memberof Product - */ - 'currency_codes': Array; - /** - * List of countries in which this product is available to recipients. - * @type {Array} - * @memberof Product - */ - 'countries': Array; - /** - * List of product images associated with this product (e.g. logos or images of the gift cards) - * @type {Array} - * @memberof Product - */ - 'images': Array; -} -export declare const ProductCategoryEnum: { - readonly Ach: "ach"; - readonly Charity: "charity"; - readonly MerchantCard: "merchant_card"; - readonly Paypal: "paypal"; - readonly Venmo: "venmo"; - readonly VisaCard: "visa_card"; -}; -export type ProductCategoryEnum = typeof ProductCategoryEnum[keyof typeof ProductCategoryEnum]; -export declare const ProductCurrencyCodesEnum: { - readonly Usd: "USD"; - readonly Cad: "CAD"; - readonly Eur: "EUR"; - readonly Aed: "AED"; - readonly Afn: "AFN"; - readonly All: "ALL"; - readonly Amd: "AMD"; - readonly Ars: "ARS"; - readonly Aud: "AUD"; - readonly Azn: "AZN"; - readonly Bam: "BAM"; - readonly Bdt: "BDT"; - readonly Bgn: "BGN"; - readonly Bhd: "BHD"; - readonly Bif: "BIF"; - readonly Bnd: "BND"; - readonly Bob: "BOB"; - readonly Brl: "BRL"; - readonly Bwp: "BWP"; - readonly Byr: "BYR"; - readonly Bzd: "BZD"; - readonly Cdf: "CDF"; - readonly Chf: "CHF"; - readonly Clp: "CLP"; - readonly Cny: "CNY"; - readonly Cop: "COP"; - readonly Crc: "CRC"; - readonly Cve: "CVE"; - readonly Czk: "CZK"; - readonly Djf: "DJF"; - readonly Dkk: "DKK"; - readonly Dop: "DOP"; - readonly Dzd: "DZD"; - readonly Eek: "EEK"; - readonly Egp: "EGP"; - readonly Ern: "ERN"; - readonly Etb: "ETB"; - readonly Gbp: "GBP"; - readonly Gel: "GEL"; - readonly Ghs: "GHS"; - readonly Gnf: "GNF"; - readonly Gtq: "GTQ"; - readonly Hkd: "HKD"; - readonly Hnl: "HNL"; - readonly Hrk: "HRK"; - readonly Huf: "HUF"; - readonly Idr: "IDR"; - readonly Ils: "ILS"; - readonly Inr: "INR"; - readonly Iqd: "IQD"; - readonly Irr: "IRR"; - readonly Isk: "ISK"; - readonly Jmd: "JMD"; - readonly Jod: "JOD"; - readonly Jpy: "JPY"; - readonly Kes: "KES"; - readonly Khr: "KHR"; - readonly Krw: "KRW"; - readonly Kwd: "KWD"; - readonly Kzt: "KZT"; - readonly Lbp: "LBP"; - readonly Lkr: "LKR"; - readonly Ltl: "LTL"; - readonly Lvl: "LVL"; - readonly Mad: "MAD"; - readonly Mdl: "MDL"; - readonly Mga: "MGA"; - readonly Mkd: "MKD"; - readonly Mmk: "MMK"; - readonly Mop: "MOP"; - readonly Mur: "MUR"; - readonly Mxn: "MXN"; - readonly Myr: "MYR"; - readonly Mzn: "MZN"; - readonly Nad: "NAD"; - readonly Ngn: "NGN"; - readonly Nio: "NIO"; - readonly Nok: "NOK"; - readonly Npr: "NPR"; - readonly Nzd: "NZD"; - readonly Omr: "OMR"; - readonly Pab: "PAB"; - readonly Pen: "PEN"; - readonly Php: "PHP"; - readonly Pkr: "PKR"; - readonly Pln: "PLN"; - readonly Pyg: "PYG"; - readonly Qar: "QAR"; - readonly Ron: "RON"; - readonly Rsd: "RSD"; - readonly Rub: "RUB"; - readonly Rwf: "RWF"; - readonly Sar: "SAR"; - readonly Sdg: "SDG"; - readonly Sek: "SEK"; - readonly Sgd: "SGD"; - readonly Sos: "SOS"; - readonly Syp: "SYP"; - readonly Thb: "THB"; - readonly Tnd: "TND"; - readonly Top: "TOP"; - readonly Try: "TRY"; - readonly Ttd: "TTD"; - readonly Twd: "TWD"; - readonly Tzs: "TZS"; - readonly Uah: "UAH"; - readonly Ugx: "UGX"; - readonly Uyu: "UYU"; - readonly Uzs: "UZS"; - readonly Vef: "VEF"; - readonly Vnd: "VND"; - readonly Xaf: "XAF"; - readonly Xof: "XOF"; - readonly Yer: "YER"; - readonly Zar: "ZAR"; - readonly Zmk: "ZMK"; -}; -export type ProductCurrencyCodesEnum = typeof ProductCurrencyCodesEnum[keyof typeof ProductCurrencyCodesEnum]; -/** - * To authenticate your requests using asymmetric key pairs (e.g., for signing embed requests), you need to share your public key with us. The public key resource allows you to manage your active public keys and track their last usage. - * @export - * @interface PublicKey - */ -export interface PublicKey { - /** - * - * @type {string} - * @memberof PublicKey - */ - 'id'?: string; - /** - * Your public key, PEM encoded - * @type {string} - * @memberof PublicKey - */ - 'pem'?: string; - /** - * The last time your public key was used to sign a request - * @type {string} - * @memberof PublicKey - */ - 'last_used_at'?: string | null; -} -/** - * Details of the recipient of the reward - * @export - * @interface Recipient - */ -export interface Recipient { - /** - * Name of the recipient - * @type {string} - * @memberof Recipient - */ - 'name'?: string; - /** - * Email address of the recipient - * @type {string} - * @memberof Recipient - */ - 'email'?: string; - /** - * Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +). - * @type {string} - * @memberof Recipient - */ - 'phone'?: string; -} -/** - * - * @export - * @interface RefundDetails - */ -export interface RefundDetails { - /** - * Total amount of the order refunds (in USD) - * @type {number} - * @memberof RefundDetails - */ - 'total': number; -} -/** - * - * @export - * @interface ResendReward422Response - */ -export interface ResendReward422Response { - /** - * - * @type {ListRewards401ResponseErrors} - * @memberof ResendReward422Response - */ - 'errors': ListRewards401ResponseErrors; -} -/** - * Flag rewards redeemed in these countries. - * @export - * @interface ReviewCountry - */ -export interface ReviewCountry { - /** - * When type is `whitelist`, it flags any countries that *are not* present in the list. When type is `blacklist`, it flags any countries that *are* present in the list. - * @type {string} - * @memberof ReviewCountry - */ - 'type': ReviewCountryTypeEnum; - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof ReviewCountry - */ - 'countries': Array; -} -export declare const ReviewCountryTypeEnum: { - readonly Whitelist: "whitelist"; - readonly Blacklist: "blacklist"; -}; -export type ReviewCountryTypeEnum = typeof ReviewCountryTypeEnum[keyof typeof ReviewCountryTypeEnum]; -/** - * List of countries where a matching redemption will trigger a review. - * @export - * @interface ReviewCountry1 - */ -export interface ReviewCountry1 { - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof ReviewCountry1 - */ - 'countries': Array; -} -/** - * Flag rewards with an email or domain matching this list. - * @export - * @interface ReviewEmail - */ -export interface ReviewEmail { - /** - * The list of emails. - * @type {Array} - * @memberof ReviewEmail - */ - 'emails'?: Array; - /** - * The list of domains. Any subdomains will also be matched against each entry in the list. - * @type {Array} - * @memberof ReviewEmail - */ - 'domains'?: Array; -} -/** - * The list of emails and/or domains where a matching redemption will trigger a review. At least one email or domain is required. - * @export - * @interface ReviewEmail1 - */ -export interface ReviewEmail1 { - /** - * The list of emails. - * @type {Array} - * @memberof ReviewEmail1 - */ - 'emails'?: Array; - /** - * The list of domains. Any subdomains will also be matched against each entry in the list. - * @type {Array} - * @memberof ReviewEmail1 - */ - 'domains'?: Array; -} -/** - * Flag rewards redeemed by an IP matching this list. - * @export - * @interface ReviewIp - */ -export interface ReviewIp { - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof ReviewIp - */ - 'ips': Array; -} -/** - * List of IP addresses and/or IP ranges where a matching redemption will trigger a review. - * @export - * @interface ReviewIp1 - */ -export interface ReviewIp1 { - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof ReviewIp1 - */ - 'ips': Array; -} -/** - * If a recipient, device, or IP redeems more than this dollar value of rewards, flag for review. - * @export - * @interface ReviewRedeemedRewardsAmount - */ -export interface ReviewRedeemedRewardsAmount { - /** - * The total amount in USD of redeemed rewards to use as a threshold. - * @type {number} - * @memberof ReviewRedeemedRewardsAmount - */ - 'amount': number; - /** - * The period, in days, to consider for the count. Use `all_time` to consider any redeemed rewards. - * @type {string} - * @memberof ReviewRedeemedRewardsAmount - */ - 'period': ReviewRedeemedRewardsAmountPeriodEnum; -} -export declare const ReviewRedeemedRewardsAmountPeriodEnum: { - readonly _7: "7"; - readonly _30: "30"; - readonly _90: "90"; - readonly _120: "120"; - readonly _365: "365"; - readonly AllTime: "all_time"; -}; -export type ReviewRedeemedRewardsAmountPeriodEnum = typeof ReviewRedeemedRewardsAmountPeriodEnum[keyof typeof ReviewRedeemedRewardsAmountPeriodEnum]; -/** - * If a recipient, device, or IP redeems more than this number of rewards, flag for review. - * @export - * @interface ReviewRedeemedRewardsCount - */ -export interface ReviewRedeemedRewardsCount { - /** - * The number of redeemed rewards to use as a threshold. - * @type {number} - * @memberof ReviewRedeemedRewardsCount - */ - 'amount': number; - /** - * The period, in days, to consider for the count. Use `all_time` to consider any redeemed rewards. - * @type {string} - * @memberof ReviewRedeemedRewardsCount - */ - 'period': ReviewRedeemedRewardsCountPeriodEnum; -} -export declare const ReviewRedeemedRewardsCountPeriodEnum: { - readonly _7: "7"; - readonly _30: "30"; - readonly _90: "90"; - readonly _120: "120"; - readonly _365: "365"; - readonly AllTime: "all_time"; -}; -export type ReviewRedeemedRewardsCountPeriodEnum = typeof ReviewRedeemedRewardsCountPeriodEnum[keyof typeof ReviewRedeemedRewardsCountPeriodEnum]; -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface Reward - */ -export interface Reward { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof Reward - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof Reward - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof Reward - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof Reward - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof Reward - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof Reward - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof Reward - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof Reward - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof Reward - */ - 'custom_fields'?: Array; - /** - * - * @type {RewardWithoutLinkDelivery} - * @memberof Reward - */ - 'delivery'?: RewardWithoutLinkDelivery; -} -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface RewardBase - */ -export interface RewardBase { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof RewardBase - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof RewardBase - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof RewardBase - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof RewardBase - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof RewardBase - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof RewardBase - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof RewardBase - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof RewardBase - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof RewardBase - */ - 'custom_fields'?: Array; -} -/** - * Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).) - * @export - * @interface RewardBaseCustomFieldsInner - */ -export interface RewardBaseCustomFieldsInner { - /** - * Tremendous ID of the custom field - * @type {string} - * @memberof RewardBaseCustomFieldsInner - */ - 'id'?: string; - /** - * Value of the custom field - * @type {string} - * @memberof RewardBaseCustomFieldsInner - */ - 'value'?: string | null; - /** - * Label of the custom field - * @type {string} - * @memberof RewardBaseCustomFieldsInner - */ - 'label'?: string; -} -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface RewardForOrderCreate - */ -export interface RewardForOrderCreate { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof RewardForOrderCreate - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof RewardForOrderCreate - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof RewardForOrderCreate - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof RewardForOrderCreate - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof RewardForOrderCreate - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof RewardForOrderCreate - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof RewardForOrderCreate - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof RewardForOrderCreate - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof RewardForOrderCreate - */ - 'custom_fields'?: Array; - /** - * Set this to translate the redemption experience for this reward. Pass a 2-letter [ISO-639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the desired language. Defaults to `en`. - * @type {string} - * @memberof RewardForOrderCreate - */ - 'language'?: string; - /** - * - * @type {SingleRewardOrder1RewardDelivery} - * @memberof RewardForOrderCreate - */ - 'delivery'?: SingleRewardOrder1RewardDelivery; -} -/** - * The redemption link for a reward. - * @export - * @interface RewardLink - */ -export interface RewardLink { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof RewardLink - */ - 'id'?: string; - /** - * Link to redeem the reward at. You need to deliver this link to the recipient. - * @type {string} - * @memberof RewardLink - */ - 'link'?: string; -} -/** - * The redemption token for a reward. - * @export - * @interface RewardToken - */ -export interface RewardToken { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof RewardToken - */ - 'id'?: string; - /** - * The token to redeem the reward. - * @type {string} - * @memberof RewardToken - */ - 'token'?: string; - /** - * Date the token expires - * @type {string} - * @memberof RewardToken - */ - 'expires_at'?: string; -} -/** - * - * @export - * @interface RewardValue - */ -export interface RewardValue { - /** - * Amount of the reward - * @type {number} - * @memberof RewardValue - */ - 'denomination': number; - /** - * Currency of the reward - * @type {string} - * @memberof RewardValue - */ - 'currency_code'?: RewardValueCurrencyCodeEnum; -} -export declare const RewardValueCurrencyCodeEnum: { - readonly Usd: "USD"; - readonly Cad: "CAD"; - readonly Eur: "EUR"; - readonly Aed: "AED"; - readonly Afn: "AFN"; - readonly All: "ALL"; - readonly Amd: "AMD"; - readonly Ars: "ARS"; - readonly Aud: "AUD"; - readonly Azn: "AZN"; - readonly Bam: "BAM"; - readonly Bdt: "BDT"; - readonly Bgn: "BGN"; - readonly Bhd: "BHD"; - readonly Bif: "BIF"; - readonly Bnd: "BND"; - readonly Bob: "BOB"; - readonly Brl: "BRL"; - readonly Bwp: "BWP"; - readonly Byr: "BYR"; - readonly Bzd: "BZD"; - readonly Cdf: "CDF"; - readonly Chf: "CHF"; - readonly Clp: "CLP"; - readonly Cny: "CNY"; - readonly Cop: "COP"; - readonly Crc: "CRC"; - readonly Cve: "CVE"; - readonly Czk: "CZK"; - readonly Djf: "DJF"; - readonly Dkk: "DKK"; - readonly Dop: "DOP"; - readonly Dzd: "DZD"; - readonly Eek: "EEK"; - readonly Egp: "EGP"; - readonly Ern: "ERN"; - readonly Etb: "ETB"; - readonly Gbp: "GBP"; - readonly Gel: "GEL"; - readonly Ghs: "GHS"; - readonly Gnf: "GNF"; - readonly Gtq: "GTQ"; - readonly Hkd: "HKD"; - readonly Hnl: "HNL"; - readonly Hrk: "HRK"; - readonly Huf: "HUF"; - readonly Idr: "IDR"; - readonly Ils: "ILS"; - readonly Inr: "INR"; - readonly Iqd: "IQD"; - readonly Irr: "IRR"; - readonly Isk: "ISK"; - readonly Jmd: "JMD"; - readonly Jod: "JOD"; - readonly Jpy: "JPY"; - readonly Kes: "KES"; - readonly Khr: "KHR"; - readonly Krw: "KRW"; - readonly Kwd: "KWD"; - readonly Kzt: "KZT"; - readonly Lbp: "LBP"; - readonly Lkr: "LKR"; - readonly Ltl: "LTL"; - readonly Lvl: "LVL"; - readonly Mad: "MAD"; - readonly Mdl: "MDL"; - readonly Mga: "MGA"; - readonly Mkd: "MKD"; - readonly Mmk: "MMK"; - readonly Mop: "MOP"; - readonly Mur: "MUR"; - readonly Mxn: "MXN"; - readonly Myr: "MYR"; - readonly Mzn: "MZN"; - readonly Nad: "NAD"; - readonly Ngn: "NGN"; - readonly Nio: "NIO"; - readonly Nok: "NOK"; - readonly Npr: "NPR"; - readonly Nzd: "NZD"; - readonly Omr: "OMR"; - readonly Pab: "PAB"; - readonly Pen: "PEN"; - readonly Php: "PHP"; - readonly Pkr: "PKR"; - readonly Pln: "PLN"; - readonly Pyg: "PYG"; - readonly Qar: "QAR"; - readonly Ron: "RON"; - readonly Rsd: "RSD"; - readonly Rub: "RUB"; - readonly Rwf: "RWF"; - readonly Sar: "SAR"; - readonly Sdg: "SDG"; - readonly Sek: "SEK"; - readonly Sgd: "SGD"; - readonly Sos: "SOS"; - readonly Syp: "SYP"; - readonly Thb: "THB"; - readonly Tnd: "TND"; - readonly Top: "TOP"; - readonly Try: "TRY"; - readonly Ttd: "TTD"; - readonly Twd: "TWD"; - readonly Tzs: "TZS"; - readonly Uah: "UAH"; - readonly Ugx: "UGX"; - readonly Uyu: "UYU"; - readonly Uzs: "UZS"; - readonly Vef: "VEF"; - readonly Vnd: "VND"; - readonly Xaf: "XAF"; - readonly Xof: "XOF"; - readonly Yer: "YER"; - readonly Zar: "ZAR"; - readonly Zmk: "ZMK"; -}; -export type RewardValueCurrencyCodeEnum = typeof RewardValueCurrencyCodeEnum[keyof typeof RewardValueCurrencyCodeEnum]; -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface RewardWithoutLink - */ -export interface RewardWithoutLink { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof RewardWithoutLink - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof RewardWithoutLink - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof RewardWithoutLink - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof RewardWithoutLink - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof RewardWithoutLink - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof RewardWithoutLink - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof RewardWithoutLink - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof RewardWithoutLink - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof RewardWithoutLink - */ - 'custom_fields'?: Array; - /** - * - * @type {RewardWithoutLinkDelivery} - * @memberof RewardWithoutLink - */ - 'delivery'?: RewardWithoutLinkDelivery; -} -/** - * Details on how the reward is delivered to the recipient. - * @export - * @interface RewardWithoutLinkDelivery - */ -export interface RewardWithoutLinkDelivery { - /** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @type {string} - * @memberof RewardWithoutLinkDelivery - */ - 'method': RewardWithoutLinkDeliveryMethodEnum; - /** - * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled. - * @type {string} - * @memberof RewardWithoutLinkDelivery - */ - 'status': RewardWithoutLinkDeliveryStatusEnum; -} -export declare const RewardWithoutLinkDeliveryMethodEnum: { - readonly Email: "EMAIL"; - readonly Link: "LINK"; - readonly Phone: "PHONE"; -}; -export type RewardWithoutLinkDeliveryMethodEnum = typeof RewardWithoutLinkDeliveryMethodEnum[keyof typeof RewardWithoutLinkDeliveryMethodEnum]; -export declare const RewardWithoutLinkDeliveryStatusEnum: { - readonly Scheduled: "SCHEDULED"; - readonly Failed: "FAILED"; - readonly Succeeded: "SUCCEEDED"; - readonly Pending: "PENDING"; -}; -export type RewardWithoutLinkDeliveryStatusEnum = typeof RewardWithoutLinkDeliveryStatusEnum[keyof typeof RewardWithoutLinkDeliveryStatusEnum]; -/** - * Each organization member is assigned a role that defines the permissions they have within the organization. - * @export - * @interface Role - */ -export interface Role { - /** - * - * @type {string} - * @memberof Role - */ - 'id': string; - /** - * - * @type {string} - * @memberof Role - */ - 'title': string; - /** - * - * @type {string} - * @memberof Role - */ - 'description': string; -} -/** - * - * @export - * @interface SimulateWebhookRequest - */ -export interface SimulateWebhookRequest { - /** - * The event to test. See the [List events endpoint reference](/reference/get_webhooks-id-events) for all available events. - * @type {string} - * @memberof SimulateWebhookRequest - */ - 'event': string; -} -/** - * An order that contains a single reward. The reward is sent to a single recipient. - * @export - * @interface SingleRewardOrder - */ -export interface SingleRewardOrder { - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof SingleRewardOrder - */ - 'external_id'?: string | null; - /** - * - * @type {SingleRewardOrder1Payment} - * @memberof SingleRewardOrder - */ - 'payment'?: SingleRewardOrder1Payment; - /** - * - * @type {SingleRewardOrderReward} - * @memberof SingleRewardOrder - */ - 'reward': SingleRewardOrderReward; -} -/** - * An order that contains a single reward. The reward is sent to a single recipient. - * @export - * @interface SingleRewardOrder1 - */ -export interface SingleRewardOrder1 { - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof SingleRewardOrder1 - */ - 'external_id'?: string | null; - /** - * - * @type {SingleRewardOrder1Payment} - * @memberof SingleRewardOrder1 - */ - 'payment'?: SingleRewardOrder1Payment; - /** - * - * @type {SingleRewardOrder1Reward} - * @memberof SingleRewardOrder1 - */ - 'reward': SingleRewardOrder1Reward; -} -/** - * - * @export - * @interface SingleRewardOrder1Payment - */ -export interface SingleRewardOrder1Payment { - /** - * Tremendous ID of the funding source that will be used to pay for the order. Use `balance` to use your Tremendous\'s balance. - * @type {string} - * @memberof SingleRewardOrder1Payment - */ - 'funding_source_id': string; -} -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface SingleRewardOrder1Reward - */ -export interface SingleRewardOrder1Reward { - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof SingleRewardOrder1Reward - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof SingleRewardOrder1Reward - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof SingleRewardOrder1Reward - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof SingleRewardOrder1Reward - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof SingleRewardOrder1Reward - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof SingleRewardOrder1Reward - */ - 'custom_fields'?: Array; - /** - * Set this to translate the redemption experience for this reward. Pass a 2-letter [ISO-639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the desired language. Defaults to `en`. - * @type {string} - * @memberof SingleRewardOrder1Reward - */ - 'language'?: string; - /** - * - * @type {SingleRewardOrder1RewardDelivery} - * @memberof SingleRewardOrder1Reward - */ - 'delivery'?: SingleRewardOrder1RewardDelivery; -} -/** - * Reward custom data for searching, tracking or copy (see [Adding custom fields to orders](https://developers.tremendous.com/reference/using-custom-fields-to-add-custom-data-to-rewards).) - * @export - * @interface SingleRewardOrder1RewardCustomFieldsInner - */ -export interface SingleRewardOrder1RewardCustomFieldsInner { - /** - * Tremendous ID of the custom field - * @type {string} - * @memberof SingleRewardOrder1RewardCustomFieldsInner - */ - 'id'?: string; - /** - * Value of the custom field - * @type {string} - * @memberof SingleRewardOrder1RewardCustomFieldsInner - */ - 'value'?: string | null; -} -/** - * Details on how the reward is delivered to the recipient. - * @export - * @interface SingleRewardOrder1RewardDelivery - */ -export interface SingleRewardOrder1RewardDelivery { - /** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @type {string} - * @memberof SingleRewardOrder1RewardDelivery - */ - 'method'?: SingleRewardOrder1RewardDeliveryMethodEnum; -} -export declare const SingleRewardOrder1RewardDeliveryMethodEnum: { - readonly Email: "EMAIL"; - readonly Link: "LINK"; - readonly Phone: "PHONE"; -}; -export type SingleRewardOrder1RewardDeliveryMethodEnum = typeof SingleRewardOrder1RewardDeliveryMethodEnum[keyof typeof SingleRewardOrder1RewardDeliveryMethodEnum]; -/** - * A single reward, sent to a recipient. A reward is always part of an order. Either `products` or `campaign_id` must be specified. - * @export - * @interface SingleRewardOrderReward - */ -export interface SingleRewardOrderReward { - /** - * Tremendous ID of the reward - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'id'?: string; - /** - * Tremendous ID of the order this reward is part of. - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'order_id'?: string; - /** - * Date the reward was created - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'created_at'?: string; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'campaign_id'?: string | null; - /** - * List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from. Providing a `products` array will override the products made available by the campaign specified using the `campaign_id` property unless the `products` array is empty. It will _not_ override other campaign attributes, like the message and customization of the look and feel. - * @type {Array} - * @memberof SingleRewardOrderReward - */ - 'products'?: Array; - /** - * - * @type {ListRewards200ResponseRewardsInnerValue} - * @memberof SingleRewardOrderReward - */ - 'value'?: ListRewards200ResponseRewardsInnerValue; - /** - * - * @type {ListRewards200ResponseRewardsInnerRecipient} - * @memberof SingleRewardOrderReward - */ - 'recipient'?: ListRewards200ResponseRewardsInnerRecipient; - /** - * Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored. - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'deliver_at'?: string; - /** - * - * @type {Array} - * @memberof SingleRewardOrderReward - */ - 'custom_fields'?: Array; - /** - * Set this to translate the redemption experience for this reward. Pass a 2-letter [ISO-639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the desired language. Defaults to `en`. - * @type {string} - * @memberof SingleRewardOrderReward - */ - 'language'?: string; - /** - * - * @type {SingleRewardOrder1RewardDelivery} - * @memberof SingleRewardOrderReward - */ - 'delivery'?: SingleRewardOrder1RewardDelivery; -} -/** - * - * @export - * @interface SingleRewardOrderWithoutLink - */ -export interface SingleRewardOrderWithoutLink { - /** - * - * @type {SingleRewardOrderWithoutLinkOrder} - * @memberof SingleRewardOrderWithoutLink - */ - 'order': SingleRewardOrderWithoutLinkOrder; -} -/** - * An order wraps around the fulfilment of one or more rewards. - * @export - * @interface SingleRewardOrderWithoutLinkOrder - */ -export interface SingleRewardOrderWithoutLinkOrder { - /** - * Tremendous ID of the order - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'id': string; - /** - * Reference for this order, supplied by the customer. When set, `external_id` makes order idempotent. All requests that use the same `external_id` after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a `201` response code. These responses **fail** to create any further orders. It also allows for retrieving by `external_id` instead of `id` only. - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'external_id'?: string | null; - /** - * ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from. - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'campaign_id'?: string | null; - /** - * Date the order has been created - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'created_at': string; - /** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'status': SingleRewardOrderWithoutLinkOrderStatusEnum; - /** - * Name of the channel in which the order was created - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'channel'?: SingleRewardOrderWithoutLinkOrderChannelEnum; - /** - * - * @type {OrderBasePayment} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'payment'?: OrderBasePayment; - /** - * The ID for the invoice associated with this order - * @type {string} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'invoice_id'?: string; - /** - * - * @type {Array} - * @memberof SingleRewardOrderWithoutLinkOrder - */ - 'rewards'?: Array; -} -export declare const SingleRewardOrderWithoutLinkOrderStatusEnum: { - readonly Canceled: "CANCELED"; - readonly Cart: "CART"; - readonly Executed: "EXECUTED"; - readonly Failed: "FAILED"; - readonly PendingApproval: "PENDING APPROVAL"; - readonly PendingInternalPaymentApproval: "PENDING INTERNAL PAYMENT APPROVAL"; -}; -export type SingleRewardOrderWithoutLinkOrderStatusEnum = typeof SingleRewardOrderWithoutLinkOrderStatusEnum[keyof typeof SingleRewardOrderWithoutLinkOrderStatusEnum]; -export declare const SingleRewardOrderWithoutLinkOrderChannelEnum: { - readonly Ui: "UI"; - readonly Api: "API"; - readonly Embed: "EMBED"; - readonly Decipher: "DECIPHER"; - readonly Qualtrics: "QUALTRICS"; - readonly Typeform: "TYPEFORM"; - readonly SurveyMonkey: "SURVEY MONKEY"; -}; -export type SingleRewardOrderWithoutLinkOrderChannelEnum = typeof SingleRewardOrderWithoutLinkOrderChannelEnum[keyof typeof SingleRewardOrderWithoutLinkOrderChannelEnum]; -/** - * - * @export - * @interface TestPublicKey - */ -export interface TestPublicKey { - /** - * A JWT token encoded with RS256, signed using the RSA private key corresponding to your public key. - * @type {string} - * @memberof TestPublicKey - */ - 'jwt': string; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface UpdateCampaign - */ -export interface UpdateCampaign { - /** - * - * @type {string} - * @memberof UpdateCampaign - */ - 'id'?: string; - /** - * Name of the campaign - * @type {string} - * @memberof UpdateCampaign - */ - 'name'?: string; - /** - * Description of the campaign - * @type {string} - * @memberof UpdateCampaign - */ - 'description'?: string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof UpdateCampaign - */ - 'products'?: Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof UpdateCampaign - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof UpdateCampaign - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * With a campaign you can define the look & feel of how rewards are sent out. It also lets you set the available products (different gift cards, charity, etc.) recipients can choose from. - * @export - * @interface UpdateCampaignRequest - */ -export interface UpdateCampaignRequest { - /** - * Name of the campaign - * @type {string} - * @memberof UpdateCampaignRequest - */ - 'name'?: string; - /** - * Description of the campaign - * @type {string} - * @memberof UpdateCampaignRequest - */ - 'description'?: string | null; - /** - * List of IDs of products (different gift cards, charity, etc.) that are available in this campaign. - * @type {Array} - * @memberof UpdateCampaignRequest - */ - 'products'?: Array; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerWebpageStyle} - * @memberof UpdateCampaignRequest - */ - 'webpage_style'?: ListCampaigns200ResponseCampaignsInnerWebpageStyle; - /** - * - * @type {ListCampaigns200ResponseCampaignsInnerEmailStyle} - * @memberof UpdateCampaignRequest - */ - 'email_style'?: ListCampaigns200ResponseCampaignsInnerEmailStyle; -} -/** - * - * @export - * @interface UpdateFraudRuleList200Response - */ -export interface UpdateFraudRuleList200Response { - /** - * A description of the result - * @type {string} - * @memberof UpdateFraudRuleList200Response - */ - 'message': string; -} -/** - * - * @export - * @interface UpdateFraudRuleListRequest - */ -export interface UpdateFraudRuleListRequest { - /** - * * `add` - append the list to the same key of the current configuration * `remove` - remove the entries in the list from the same key of the current configuration - * @type {string} - * @memberof UpdateFraudRuleListRequest - */ - 'operation': UpdateFraudRuleListRequestOperationEnum; - /** - * - * @type {UpdateFraudRuleListRequestConfig} - * @memberof UpdateFraudRuleListRequest - */ - 'config': UpdateFraudRuleListRequestConfig; -} -export declare const UpdateFraudRuleListRequestOperationEnum: { - readonly Add: "add"; - readonly Remove: "remove"; -}; -export type UpdateFraudRuleListRequestOperationEnum = typeof UpdateFraudRuleListRequestOperationEnum[keyof typeof UpdateFraudRuleListRequestOperationEnum]; -/** - * The configuration associated with the rule. The properties allowed depend on the type of rule. - * @export - * @interface UpdateFraudRuleListRequestConfig - */ -export interface UpdateFraudRuleListRequestConfig { - /** - * An array of country codes (ISO-3166 alpha-2 character code) - * @type {Array} - * @memberof UpdateFraudRuleListRequestConfig - */ - 'countries': Array; - /** - * The list of IP addresses to flag or allow. Accepts both IPv4 and IPv6 addresses using CIDR notation. - * @type {Array} - * @memberof UpdateFraudRuleListRequestConfig - */ - 'ips': Array; - /** - * The list of emails. - * @type {Array} - * @memberof UpdateFraudRuleListRequestConfig - */ - 'emails': Array; - /** - * The list of domains. Any subdomains will also be matched against each entry in the list. - * @type {Array} - * @memberof UpdateFraudRuleListRequestConfig - */ - 'domains'?: Array; -} -/** - * - * @export - * @interface Webhook - */ -export interface Webhook { - /** - * - * @type {string} - * @memberof Webhook - */ - 'id'?: string; - /** - * URL the webhook will make requests to - * @type {string} - * @memberof Webhook - */ - 'url': string | null; - /** - * Private key for the webhook - * @type {string} - * @memberof Webhook - */ - 'private_key'?: string; -} -/** - * - * @export - * @interface WebhookPost - */ -export interface WebhookPost { - /** - * URL the webhook will make requests to - * @type {string} - * @memberof WebhookPost - */ - 'url': string; -} -/** - * BalanceTransactionsApi - axios parameter creator - * @export - */ -export declare const BalanceTransactionsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions: (offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * BalanceTransactionsApi - functional programming interface - * @export - */ -export declare const BalanceTransactionsApiFp: (configuration?: Configuration) => { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions(offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * BalanceTransactionsApi - factory interface - * @export - */ -export declare const BalanceTransactionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions(offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * BalanceTransactionsApi - object-oriented interface - * @export - * @class BalanceTransactionsApi - * @extends {BaseAPI} - */ -export declare class BalanceTransactionsApi extends BaseAPI { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BalanceTransactionsApi - */ - listBalanceTransactions(offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * CampaignsApi - axios parameter creator - * @export - */ -export declare const CampaignsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign: (createCampaignRequest: CreateCampaignRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns: (options?: RawAxiosRequestConfig) => Promise; - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign: (id: string, updateCampaignRequest: UpdateCampaignRequest, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * CampaignsApi - functional programming interface - * @export - */ -export declare const CampaignsApiFp: (configuration?: Configuration) => { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign(createCampaignRequest: CreateCampaignRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign(id: string, updateCampaignRequest: UpdateCampaignRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * CampaignsApi - factory interface - * @export - */ -export declare const CampaignsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign(createCampaignRequest: CreateCampaignRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns(options?: RawAxiosRequestConfig): AxiosPromise; - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign(id: string, updateCampaignRequest: UpdateCampaignRequest, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * CampaignsApi - object-oriented interface - * @export - * @class CampaignsApi - * @extends {BaseAPI} - */ -export declare class CampaignsApi extends BaseAPI { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - createCampaign(createCampaignRequest: CreateCampaignRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - getCampaign(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - listCampaigns(options?: RawAxiosRequestConfig): Promise>; - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - updateCampaign(id: string, updateCampaignRequest: UpdateCampaignRequest, options?: RawAxiosRequestConfig): Promise>; -} -/** - * FieldsApi - axios parameter creator - * @export - */ -export declare const FieldsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields: (options?: RawAxiosRequestConfig) => Promise; -}; -/** - * FieldsApi - functional programming interface - * @export - */ -export declare const FieldsApiFp: (configuration?: Configuration) => { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * FieldsApi - factory interface - * @export - */ -export declare const FieldsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields(options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * FieldsApi - object-oriented interface - * @export - * @class FieldsApi - * @extends {BaseAPI} - */ -export declare class FieldsApi extends BaseAPI { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FieldsApi - */ - listFields(options?: RawAxiosRequestConfig): Promise>; -} -/** - * ForexApi - axios parameter creator - * @export - */ -export declare const ForexApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex: (base?: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * ForexApi - functional programming interface - * @export - */ -export declare const ForexApiFp: (configuration?: Configuration) => { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex(base?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * ForexApi - factory interface - * @export - */ -export declare const ForexApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex(base?: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * ForexApi - object-oriented interface - * @export - * @class ForexApi - * @extends {BaseAPI} - */ -export declare class ForexApi extends BaseAPI { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ForexApi - */ - listForex(base?: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * FraudReviewsApi - axios parameter creator - * @export - */ -export declare const FraudReviewsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews: (offset?: number, limit?: number, status?: ListFraudReviewsStatusEnum, createdAtGte?: string, createdAtLte?: string, redeemedAtGte?: string, redeemedAtLte?: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview: (id: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * FraudReviewsApi - functional programming interface - * @export - */ -export declare const FraudReviewsApiFp: (configuration?: Configuration) => { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews(offset?: number, limit?: number, status?: ListFraudReviewsStatusEnum, createdAtGte?: string, createdAtLte?: string, redeemedAtGte?: string, redeemedAtLte?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * FraudReviewsApi - factory interface - * @export - */ -export declare const FraudReviewsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews(offset?: number, limit?: number, status?: ListFraudReviewsStatusEnum, createdAtGte?: string, createdAtLte?: string, redeemedAtGte?: string, redeemedAtLte?: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview(id: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * FraudReviewsApi - object-oriented interface - * @export - * @class FraudReviewsApi - * @extends {BaseAPI} - */ -export declare class FraudReviewsApi extends BaseAPI { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - blockFraudReview(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - getFraudReview(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - listFraudReviews(offset?: number, limit?: number, status?: ListFraudReviewsStatusEnum, createdAtGte?: string, createdAtLte?: string, redeemedAtGte?: string, redeemedAtLte?: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - releaseFraudReview(id: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * @export - */ -export declare const ListFraudReviewsStatusEnum: { - readonly Flagged: "flagged"; - readonly Blocked: "blocked"; - readonly Released: "released"; -}; -export type ListFraudReviewsStatusEnum = typeof ListFraudReviewsStatusEnum[keyof typeof ListFraudReviewsStatusEnum]; -/** - * FraudRulesApi - axios parameter creator - * @export - */ -export declare const FraudRulesApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule: (ruleType: DeleteFraudRuleRuleTypeEnum, options?: RawAxiosRequestConfig) => Promise; - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule: (ruleType: FraudRuleRuleTypeEnum, fraudRuleRequest?: FraudRuleRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules: (options?: RawAxiosRequestConfig) => Promise; - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList: (ruleType: UpdateFraudRuleListRuleTypeEnum, updateFraudRuleListRequest: UpdateFraudRuleListRequest, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * FraudRulesApi - functional programming interface - * @export - */ -export declare const FraudRulesApiFp: (configuration?: Configuration) => { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule(ruleType: DeleteFraudRuleRuleTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule(ruleType: FraudRuleRuleTypeEnum, fraudRuleRequest?: FraudRuleRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList(ruleType: UpdateFraudRuleListRuleTypeEnum, updateFraudRuleListRequest: UpdateFraudRuleListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * FraudRulesApi - factory interface - * @export - */ -export declare const FraudRulesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule(ruleType: DeleteFraudRuleRuleTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule(ruleType: FraudRuleRuleTypeEnum, fraudRuleRequest?: FraudRuleRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules(options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList(ruleType: UpdateFraudRuleListRuleTypeEnum, updateFraudRuleListRequest: UpdateFraudRuleListRequest, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * FraudRulesApi - object-oriented interface - * @export - * @class FraudRulesApi - * @extends {BaseAPI} - */ -export declare class FraudRulesApi extends BaseAPI { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - deleteFraudRule(ruleType: DeleteFraudRuleRuleTypeEnum, options?: RawAxiosRequestConfig): Promise>; - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - fraudRule(ruleType: FraudRuleRuleTypeEnum, fraudRuleRequest?: FraudRuleRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - listFraudRules(options?: RawAxiosRequestConfig): Promise>; - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - updateFraudRuleList(ruleType: UpdateFraudRuleListRuleTypeEnum, updateFraudRuleListRequest: UpdateFraudRuleListRequest, options?: RawAxiosRequestConfig): Promise>; -} -/** - * @export - */ -export declare const DeleteFraudRuleRuleTypeEnum: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly ReviewRedeemedRewardsCount: "review_redeemed_rewards_count"; - readonly ReviewRedeemedRewardsAmount: "review_redeemed_rewards_amount"; - readonly ReviewMultipleEmails: "review_multiple_emails"; - readonly ReviewVpn: "review_vpn"; - readonly ReviewTremendousFlagList: "review_tremendous_flag_list"; - readonly ReviewPreviouslyBlockedRecipients: "review_previously_blocked_recipients"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type DeleteFraudRuleRuleTypeEnum = typeof DeleteFraudRuleRuleTypeEnum[keyof typeof DeleteFraudRuleRuleTypeEnum]; -/** - * @export - */ -export declare const FraudRuleRuleTypeEnum: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly ReviewRedeemedRewardsCount: "review_redeemed_rewards_count"; - readonly ReviewRedeemedRewardsAmount: "review_redeemed_rewards_amount"; - readonly ReviewMultipleEmails: "review_multiple_emails"; - readonly ReviewVpn: "review_vpn"; - readonly ReviewTremendousFlagList: "review_tremendous_flag_list"; - readonly ReviewPreviouslyBlockedRecipients: "review_previously_blocked_recipients"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type FraudRuleRuleTypeEnum = typeof FraudRuleRuleTypeEnum[keyof typeof FraudRuleRuleTypeEnum]; -/** - * @export - */ -export declare const UpdateFraudRuleListRuleTypeEnum: { - readonly ReviewCountry: "review_country"; - readonly ReviewIp: "review_ip"; - readonly ReviewEmail: "review_email"; - readonly AllowIp: "allow_ip"; - readonly AllowEmail: "allow_email"; -}; -export type UpdateFraudRuleListRuleTypeEnum = typeof UpdateFraudRuleListRuleTypeEnum[keyof typeof UpdateFraudRuleListRuleTypeEnum]; -/** - * FundingSourcesApi - axios parameter creator - * @export - */ -export declare const FundingSourcesApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources: (options?: RawAxiosRequestConfig) => Promise; -}; -/** - * FundingSourcesApi - functional programming interface - * @export - */ -export declare const FundingSourcesApiFp: (configuration?: Configuration) => { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * FundingSourcesApi - factory interface - * @export - */ -export declare const FundingSourcesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources(options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * FundingSourcesApi - object-oriented interface - * @export - * @class FundingSourcesApi - * @extends {BaseAPI} - */ -export declare class FundingSourcesApi extends BaseAPI { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FundingSourcesApi - */ - getFundingSource(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FundingSourcesApi - */ - listFundingSources(options?: RawAxiosRequestConfig): Promise>; -} -/** - * InvoicesApi - axios parameter creator - * @export - */ -export declare const InvoicesApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice: (createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices: (offset?: number, limit?: number, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * InvoicesApi - functional programming interface - * @export - */ -export declare const InvoicesApiFp: (configuration?: Configuration) => { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices(offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * InvoicesApi - factory interface - * @export - */ -export declare const InvoicesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices(offset?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * InvoicesApi - object-oriented interface - * @export - * @class InvoicesApi - * @extends {BaseAPI} - */ -export declare class InvoicesApi extends BaseAPI { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - deleteInvoices(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - downloadInvoiceCsv(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - downloadInvoicePdf(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - getInvoice(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - listInvoices(offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise>; -} -/** - * MembersApi - axios parameter creator - * @export - */ -export declare const MembersApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember: (createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers: (options?: RawAxiosRequestConfig) => Promise; -}; -/** - * MembersApi - functional programming interface - * @export - */ -export declare const MembersApiFp: (configuration?: Configuration) => { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember(createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * MembersApi - factory interface - * @export - */ -export declare const MembersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember(createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers(options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * MembersApi - object-oriented interface - * @export - * @class MembersApi - * @extends {BaseAPI} - */ -export declare class MembersApi extends BaseAPI { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - createMember(createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - getMember(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - listMembers(options?: RawAxiosRequestConfig): Promise>; -} -/** - * OrdersApi - axios parameter creator - * @export - */ -export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder: (createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders: (offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise; - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder: (id: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * OrdersApi - functional programming interface - * @export - */ -export declare const OrdersApiFp: (configuration?: Configuration) => { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder(createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders(offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * OrdersApi - factory interface - * @export - */ -export declare const OrdersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder(createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders(offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder(id: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * OrdersApi - object-oriented interface - * @export - * @class OrdersApi - * @extends {BaseAPI} - */ -export declare class OrdersApi extends BaseAPI { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - approveOrder(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - createOrder(createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - getOrder(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - listOrders(offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig): Promise>; - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * OrganizationsApi - axios parameter creator - * @export - */ -export declare const OrganizationsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey: (options?: RawAxiosRequestConfig) => Promise; - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization: (createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations: (options?: RawAxiosRequestConfig) => Promise; -}; -/** - * OrganizationsApi - functional programming interface - * @export - */ -export declare const OrganizationsApiFp: (configuration?: Configuration) => { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization(createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * OrganizationsApi - factory interface - * @export - */ -export declare const OrganizationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey(options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization(createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations(options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * OrganizationsApi - object-oriented interface - * @export - * @class OrganizationsApi - * @extends {BaseAPI} - */ -export declare class OrganizationsApi extends BaseAPI { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - createApiKey(options?: RawAxiosRequestConfig): Promise>; - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - createOrganization(createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - getOrganization(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - listOrganizations(options?: RawAxiosRequestConfig): Promise>; -} -/** - * ProductsApi - axios parameter creator - * @export - */ -export declare const ProductsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts: (country?: string, currency?: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * ProductsApi - functional programming interface - * @export - */ -export declare const ProductsApiFp: (configuration?: Configuration) => { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * ProductsApi - factory interface - * @export - */ -export declare const ProductsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * ProductsApi - object-oriented interface - * @export - * @class ProductsApi - * @extends {BaseAPI} - */ -export declare class ProductsApi extends BaseAPI { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProductsApi - */ - getProduct(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProductsApi - */ - listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * RewardsApi - axios parameter creator - * @export - */ -export declare const RewardsApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards: (offset?: number, options?: RawAxiosRequestConfig) => Promise; - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward: (id: string, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * RewardsApi - functional programming interface - * @export - */ -export declare const RewardsApiFp: (configuration?: Configuration) => { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards(offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * RewardsApi - factory interface - * @export - */ -export declare const RewardsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards(offset?: number, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward(id: string, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * RewardsApi - object-oriented interface - * @export - * @class RewardsApi - * @extends {BaseAPI} - */ -export declare class RewardsApi extends BaseAPI { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - generateRewardLink(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - generateRewardToken(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - getReward(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - listRewards(offset?: number, options?: RawAxiosRequestConfig): Promise>; - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - resendReward(id: string, options?: RawAxiosRequestConfig): Promise>; -} -/** - * RolesApi - axios parameter creator - * @export - */ -export declare const RolesApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles: (options?: RawAxiosRequestConfig) => Promise; -}; -/** - * RolesApi - functional programming interface - * @export - */ -export declare const RolesApiFp: (configuration?: Configuration) => { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * RolesApi - factory interface - * @export - */ -export declare const RolesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles(options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * RolesApi - object-oriented interface - * @export - * @class RolesApi - * @extends {BaseAPI} - */ -export declare class RolesApi extends BaseAPI { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi - */ - listRoles(options?: RawAxiosRequestConfig): Promise>; -} -/** - * WebhooksApi - axios parameter creator - * @export - */ -export declare const WebhooksApiAxiosParamCreator: (configuration?: Configuration) => { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook: (createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig) => Promise; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents: (id: string, options?: RawAxiosRequestConfig) => Promise; - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks: (options?: RawAxiosRequestConfig) => Promise; - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook: (id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig) => Promise; -}; -/** - * WebhooksApi - functional programming interface - * @export - */ -export declare const WebhooksApiFp: (configuration?: Configuration) => { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook(createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook(id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; -}; -/** - * WebhooksApi - factory interface - * @export - */ -export declare const WebhooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook(createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks(options?: RawAxiosRequestConfig): AxiosPromise; - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook(id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig): AxiosPromise; -}; -/** - * WebhooksApi - object-oriented interface - * @export - * @class WebhooksApi - * @extends {BaseAPI} - */ -export declare class WebhooksApi extends BaseAPI { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - createWebhook(createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig): Promise>; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - deleteWebhook(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - getWebhook(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - listWebhookEvents(id: string, options?: RawAxiosRequestConfig): Promise>; - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - listWebhooks(options?: RawAxiosRequestConfig): Promise>; - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - simulateWebhook(id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig): Promise>; -} diff --git a/dist/api.js b/dist/api.js deleted file mode 100644 index 3cd734c..0000000 --- a/dist/api.js +++ /dev/null @@ -1,5299 +0,0 @@ -"use strict"; -/* tslint:disable */ -/* eslint-disable */ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MemberStatusEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = exports.ListOrders200ResponseOrdersInnerChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = exports.GetFraudReview200ResponseFraudReviewReasonsEnum = exports.GetFraudReview200ResponseFraudReviewStatusEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.FraudRulesListItemRuleTypeEnum = exports.FraudRuleType = exports.FraudRuleRequestConfigPeriodEnum = exports.FraudRuleRequestConfigTypeEnum = exports.FraudReviewStatus = exports.FraudReviewRedemptionMethod = exports.FraudReviewReason = exports.FraudReviewListItemReasonsEnum = exports.FraudReviewListItemStatusEnum = exports.FraudReviewRedemptionMethodEnum = exports.FraudReviewReasonsEnum = exports.FraudReviewStatusEnum = exports.FraudConfigRedeemedRewardsCountPeriodEnum = exports.FraudConfigRedeemedRewardsAmountPeriodEnum = exports.FraudConfigCountryTypeEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateOrganization200ResponseOrganizationStatusEnum = exports.Channel = void 0; -exports.FraudRulesApi = exports.FraudRulesApiFactory = exports.FraudRulesApiFp = exports.FraudRulesApiAxiosParamCreator = exports.ListFraudReviewsStatusEnum = exports.FraudReviewsApi = exports.FraudReviewsApiFactory = exports.FraudReviewsApiFp = exports.FraudReviewsApiAxiosParamCreator = exports.ForexApi = exports.ForexApiFactory = exports.ForexApiFp = exports.ForexApiAxiosParamCreator = exports.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = exports.FieldsApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.UpdateFraudRuleListRequestOperationEnum = exports.SingleRewardOrderWithoutLinkOrderChannelEnum = exports.SingleRewardOrderWithoutLinkOrderStatusEnum = exports.SingleRewardOrder1RewardDeliveryMethodEnum = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ReviewRedeemedRewardsCountPeriodEnum = exports.ReviewRedeemedRewardsAmountPeriodEnum = exports.ReviewCountryTypeEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PaymentDetailsChannelEnum = exports.OrganizationStatusEnum = exports.OrderWithoutLinkChannelEnum = exports.OrderWithoutLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseChannelEnum = exports.OrderBaseStatusEnum = exports.OrderChannelEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithEventsStatusEnum = exports.MemberBaseStatusEnum = void 0; -exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = exports.FundingSourcesApi = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.UpdateFraudRuleListRuleTypeEnum = exports.FraudRuleRuleTypeEnum = exports.DeleteFraudRuleRuleTypeEnum = void 0; -const axios_1 = require("axios"); -// Some imports not used depending on template conditions -// @ts-ignore -const common_1 = require("./common"); -// @ts-ignore -const base_1 = require("./base"); -/** - * Name of the channel in which the order was created - * @export - * @enum {string} - */ -exports.Channel = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.CreateOrganization200ResponseOrganizationStatusEnum = { - Pending: 'PENDING', - Approved: 'APPROVED', - Rejected: 'REJECTED' -}; -/** - * - * @export - * @enum {string} - */ -exports.CurrencyCodes = { - Usd: 'USD', - Cad: 'CAD', - Eur: 'EUR', - Aed: 'AED', - Afn: 'AFN', - All: 'ALL', - Amd: 'AMD', - Ars: 'ARS', - Aud: 'AUD', - Azn: 'AZN', - Bam: 'BAM', - Bdt: 'BDT', - Bgn: 'BGN', - Bhd: 'BHD', - Bif: 'BIF', - Bnd: 'BND', - Bob: 'BOB', - Brl: 'BRL', - Bwp: 'BWP', - Byr: 'BYR', - Bzd: 'BZD', - Cdf: 'CDF', - Chf: 'CHF', - Clp: 'CLP', - Cny: 'CNY', - Cop: 'COP', - Crc: 'CRC', - Cve: 'CVE', - Czk: 'CZK', - Djf: 'DJF', - Dkk: 'DKK', - Dop: 'DOP', - Dzd: 'DZD', - Eek: 'EEK', - Egp: 'EGP', - Ern: 'ERN', - Etb: 'ETB', - Gbp: 'GBP', - Gel: 'GEL', - Ghs: 'GHS', - Gnf: 'GNF', - Gtq: 'GTQ', - Hkd: 'HKD', - Hnl: 'HNL', - Hrk: 'HRK', - Huf: 'HUF', - Idr: 'IDR', - Ils: 'ILS', - Inr: 'INR', - Iqd: 'IQD', - Irr: 'IRR', - Isk: 'ISK', - Jmd: 'JMD', - Jod: 'JOD', - Jpy: 'JPY', - Kes: 'KES', - Khr: 'KHR', - Krw: 'KRW', - Kwd: 'KWD', - Kzt: 'KZT', - Lbp: 'LBP', - Lkr: 'LKR', - Ltl: 'LTL', - Lvl: 'LVL', - Mad: 'MAD', - Mdl: 'MDL', - Mga: 'MGA', - Mkd: 'MKD', - Mmk: 'MMK', - Mop: 'MOP', - Mur: 'MUR', - Mxn: 'MXN', - Myr: 'MYR', - Mzn: 'MZN', - Nad: 'NAD', - Ngn: 'NGN', - Nio: 'NIO', - Nok: 'NOK', - Npr: 'NPR', - Nzd: 'NZD', - Omr: 'OMR', - Pab: 'PAB', - Pen: 'PEN', - Php: 'PHP', - Pkr: 'PKR', - Pln: 'PLN', - Pyg: 'PYG', - Qar: 'QAR', - Ron: 'RON', - Rsd: 'RSD', - Rub: 'RUB', - Rwf: 'RWF', - Sar: 'SAR', - Sdg: 'SDG', - Sek: 'SEK', - Sgd: 'SGD', - Sos: 'SOS', - Syp: 'SYP', - Thb: 'THB', - Tnd: 'TND', - Top: 'TOP', - Try: 'TRY', - Ttd: 'TTD', - Twd: 'TWD', - Tzs: 'TZS', - Uah: 'UAH', - Ugx: 'UGX', - Uyu: 'UYU', - Uzs: 'UZS', - Vef: 'VEF', - Vnd: 'VND', - Xaf: 'XAF', - Xof: 'XOF', - Yer: 'YER', - Zar: 'ZAR', - Zmk: 'ZMK' -}; -exports.DeliveryDetailsMethodEnum = { - Email: 'EMAIL', - Link: 'LINK', - Phone: 'PHONE' -}; -exports.DeliveryDetailsStatusEnum = { - Scheduled: 'SCHEDULED', - Failed: 'FAILED', - Succeeded: 'SUCCEEDED', - Pending: 'PENDING' -}; -/** - * How to deliver the reward to the recipient.
Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
- * @export - * @enum {string} - */ -exports.DeliveryMethod = { - Email: 'EMAIL', - Link: 'LINK', - Phone: 'PHONE' -}; -/** - * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled. - * @export - * @enum {string} - */ -exports.DeliveryStatus = { - Scheduled: 'SCHEDULED', - Failed: 'FAILED', - Succeeded: 'SUCCEEDED', - Pending: 'PENDING' -}; -exports.FraudConfigCountryTypeEnum = { - Whitelist: 'whitelist', - Blacklist: 'blacklist' -}; -exports.FraudConfigRedeemedRewardsAmountPeriodEnum = { - _7: '7', - _30: '30', - _90: '90', - _120: '120', - _365: '365', - AllTime: 'all_time' -}; -exports.FraudConfigRedeemedRewardsCountPeriodEnum = { - _7: '7', - _30: '30', - _90: '90', - _120: '120', - _365: '365', - AllTime: 'all_time' -}; -exports.FraudReviewStatusEnum = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -exports.FraudReviewReasonsEnum = { - DisallowedIp: 'Disallowed IP', - DisallowedEmail: 'Disallowed email', - DisallowedCountry: 'Disallowed country', - OverRewardDollarLimit: 'Over reward dollar limit', - OverRewardCountLimit: 'Over reward count limit', - VpnDetected: 'VPN detected', - DeviceRelatedToMultipleEmails: 'Device related to multiple emails', - DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails', - IpOnATremendousFraudList: 'IP on a Tremendous fraud list', - BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list', - FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list', - EmailOnATremendousFraudList: 'Email on a Tremendous fraud list', - PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list', - IpRelatedToABlockedReward: 'IP related to a blocked reward', - BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward', - FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward', - EmailRelatedToABlockedReward: 'Email related to a blocked reward', - PhoneRelatedToABlockedReward: 'Phone related to a blocked reward', - AllowedIp: 'Allowed IP', - AllowedEmail: 'Allowed email' -}; -exports.FraudReviewRedemptionMethodEnum = { - Paypal: 'paypal', - Bank: 'bank', - MerchantCard: 'merchant card', - VisaCard: 'visa card', - Charity: 'charity', - Venmo: 'venmo' -}; -exports.FraudReviewListItemStatusEnum = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -exports.FraudReviewListItemReasonsEnum = { - DisallowedIp: 'Disallowed IP', - DisallowedEmail: 'Disallowed email', - DisallowedCountry: 'Disallowed country', - OverRewardDollarLimit: 'Over reward dollar limit', - OverRewardCountLimit: 'Over reward count limit', - VpnDetected: 'VPN detected', - DeviceRelatedToMultipleEmails: 'Device related to multiple emails', - DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails', - IpOnATremendousFraudList: 'IP on a Tremendous fraud list', - BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list', - FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list', - EmailOnATremendousFraudList: 'Email on a Tremendous fraud list', - PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list', - IpRelatedToABlockedReward: 'IP related to a blocked reward', - BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward', - FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward', - EmailRelatedToABlockedReward: 'Email related to a blocked reward', - PhoneRelatedToABlockedReward: 'Phone related to a blocked reward', - AllowedIp: 'Allowed IP', - AllowedEmail: 'Allowed email' -}; -/** - * - * @export - * @enum {string} - */ -exports.FraudReviewReason = { - DisallowedIp: 'Disallowed IP', - DisallowedEmail: 'Disallowed email', - DisallowedCountry: 'Disallowed country', - OverRewardDollarLimit: 'Over reward dollar limit', - OverRewardCountLimit: 'Over reward count limit', - VpnDetected: 'VPN detected', - DeviceRelatedToMultipleEmails: 'Device related to multiple emails', - DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails', - IpOnATremendousFraudList: 'IP on a Tremendous fraud list', - BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list', - FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list', - EmailOnATremendousFraudList: 'Email on a Tremendous fraud list', - PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list', - IpRelatedToABlockedReward: 'IP related to a blocked reward', - BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward', - FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward', - EmailRelatedToABlockedReward: 'Email related to a blocked reward', - PhoneRelatedToABlockedReward: 'Phone related to a blocked reward', - AllowedIp: 'Allowed IP', - AllowedEmail: 'Allowed email' -}; -/** - * - * @export - * @enum {string} - */ -exports.FraudReviewRedemptionMethod = { - Paypal: 'paypal', - Bank: 'bank', - MerchantCard: 'merchant card', - VisaCard: 'visa card', - Charity: 'charity', - Venmo: 'venmo' -}; -/** - * The current status of the fraud review: * `flagged` - The reward has been flagged for and waiting manual review. * `blocked` - The reward was reviewed and blocked. * `released` - The reward was reviewed and released. - * @export - * @enum {string} - */ -exports.FraudReviewStatus = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -exports.FraudRuleRequestConfigTypeEnum = { - Whitelist: 'whitelist', - Blacklist: 'blacklist' -}; -exports.FraudRuleRequestConfigPeriodEnum = { - _7: '7', - _30: '30', - _90: '90', - _120: '120', - _365: '365', - AllTime: 'all_time' -}; -/** - * * `review_country` - Flags when the recipient\'s IP country matches the criteria in the rule * `review_ip` - Flags when recipient\'s IP matches one in the list * `review_email` - Flags when the recipient\'s email matches one in the list * `review_redeemed_rewards_count` - Flags when the recipient redeemed more than the number of rewards specified in the config * `review_redeemed_rewards_amount` - Flags when the recipient redeemed more than the total amount specified in the config * `review_multiple_emails` - Flags when recipient\'s device or account has multiple emails associated * `review_vpn` - Flags when VPN is suspected * `review_tremendous_flag_list` - Flags rewards when redemption attributes match at least one criteria defined by the Tremendous flag list * `review_previously_blocked_recipients` - Flags rewards when the recipient has been blocked before * `allow_ip` - Releases a reward when a recipient\'s IP matches one in the list * `allow_email` - Releases a reward when the recipient\'s email matches one in the list - * @export - * @enum {string} - */ -exports.FraudRuleType = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count', - ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount', - ReviewMultipleEmails: 'review_multiple_emails', - ReviewVpn: 'review_vpn', - ReviewTremendousFlagList: 'review_tremendous_flag_list', - ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -exports.FraudRulesListItemRuleTypeEnum = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count', - ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount', - ReviewMultipleEmails: 'review_multiple_emails', - ReviewVpn: 'review_vpn', - ReviewTremendousFlagList: 'review_tremendous_flag_list', - ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -exports.FundingSourceMethodEnum = { - Balance: 'balance', - BankAccount: 'bank_account', - CreditCard: 'credit_card', - Invoice: 'invoice' -}; -exports.FundingSourceTypeEnum = { - Commercial: 'COMMERCIAL', - ProForma: 'PRO_FORMA', - PrefundingOnly: 'PREFUNDING_ONLY' -}; -exports.GetFraudReview200ResponseFraudReviewStatusEnum = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -exports.GetFraudReview200ResponseFraudReviewReasonsEnum = { - DisallowedIp: 'Disallowed IP', - DisallowedEmail: 'Disallowed email', - DisallowedCountry: 'Disallowed country', - OverRewardDollarLimit: 'Over reward dollar limit', - OverRewardCountLimit: 'Over reward count limit', - VpnDetected: 'VPN detected', - DeviceRelatedToMultipleEmails: 'Device related to multiple emails', - DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails', - IpOnATremendousFraudList: 'IP on a Tremendous fraud list', - BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list', - FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list', - EmailOnATremendousFraudList: 'Email on a Tremendous fraud list', - PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list', - IpRelatedToABlockedReward: 'IP related to a blocked reward', - BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward', - FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward', - EmailRelatedToABlockedReward: 'Email related to a blocked reward', - PhoneRelatedToABlockedReward: 'Phone related to a blocked reward', - AllowedIp: 'Allowed IP', - AllowedEmail: 'Allowed email' -}; -exports.GetFraudReview200ResponseFraudReviewRedemptionMethodEnum = { - Paypal: 'paypal', - Bank: 'bank', - MerchantCard: 'merchant card', - VisaCard: 'visa card', - Charity: 'charity', - Venmo: 'venmo' -}; -exports.GetMember200ResponseMemberStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.GetMember200ResponseMemberEventsInnerTypeEnum = { - Created: 'created', - LastLogin: 'last_login' -}; -exports.InvoiceStatusEnum = { - Deleted: 'DELETED', - Paid: 'PAID', - Open: 'OPEN', - MarkedAsPaid: 'MARKED_AS_PAID' -}; -exports.ListFraudReviews200ResponseFraudReviewsInnerStatusEnum = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -exports.ListFraudReviews200ResponseFraudReviewsInnerReasonsEnum = { - DisallowedIp: 'Disallowed IP', - DisallowedEmail: 'Disallowed email', - DisallowedCountry: 'Disallowed country', - OverRewardDollarLimit: 'Over reward dollar limit', - OverRewardCountLimit: 'Over reward count limit', - VpnDetected: 'VPN detected', - DeviceRelatedToMultipleEmails: 'Device related to multiple emails', - DeviceOrAccountRelatedToMultipleEmails: 'Device or account related to multiple emails', - IpOnATremendousFraudList: 'IP on a Tremendous fraud list', - BankAccountOnATremendousFraudList: 'Bank account on a Tremendous fraud list', - FingerprintOnATremendousFraudList: 'Fingerprint on a Tremendous fraud list', - EmailOnATremendousFraudList: 'Email on a Tremendous fraud list', - PhoneOnATremendousFraudList: 'Phone on a Tremendous fraud list', - IpRelatedToABlockedReward: 'IP related to a blocked reward', - BankAccountRelatedToABlockedReward: 'Bank account related to a blocked reward', - FingerprintRelatedToABlockedReward: 'Fingerprint related to a blocked reward', - EmailRelatedToABlockedReward: 'Email related to a blocked reward', - PhoneRelatedToABlockedReward: 'Phone related to a blocked reward', - AllowedIp: 'Allowed IP', - AllowedEmail: 'Allowed email' -}; -exports.ListFraudRules200ResponseFraudRulesInnerRuleTypeEnum = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count', - ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount', - ReviewMultipleEmails: 'review_multiple_emails', - ReviewVpn: 'review_vpn', - ReviewTremendousFlagList: 'review_tremendous_flag_list', - ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = { - Balance: 'balance', - BankAccount: 'bank_account', - CreditCard: 'credit_card', - Invoice: 'invoice' -}; -exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = { - Commercial: 'COMMERCIAL', - ProForma: 'PRO_FORMA', - PrefundingOnly: 'PREFUNDING_ONLY' -}; -exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = { - Checking: 'checking', - Savings: 'savings' -}; -exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = { - MasterCard: 'MasterCard', - Amex: 'Amex', - Jcb: 'JCB', - DinersClub: 'Diner\'s Club', - Visa: 'visa', - Discover: 'discover', - Laser: 'laser', - Elo: 'elo', - Maestro: 'maestro', - Solo: 'solo' -}; -exports.ListInvoices200ResponseInvoicesInnerStatusEnum = { - Deleted: 'DELETED', - Paid: 'PAID', - Open: 'OPEN', - MarkedAsPaid: 'MARKED_AS_PAID' -}; -exports.ListMembers200ResponseMembersInnerStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.ListOrders200ResponseOrdersInnerStatusEnum = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.ListOrders200ResponseOrdersInnerChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = { - Pending: 'PENDING', - Approved: 'APPROVED', - Rejected: 'REJECTED' -}; -exports.ListProductsResponseProductsInnerCategoryEnum = { - Ach: 'ach', - Charity: 'charity', - MerchantCard: 'merchant_card', - Paypal: 'paypal', - Venmo: 'venmo', - VisaCard: 'visa_card' -}; -exports.ListProductsResponseProductsInnerCurrencyCodesEnum = { - Usd: 'USD', - Cad: 'CAD', - Eur: 'EUR', - Aed: 'AED', - Afn: 'AFN', - All: 'ALL', - Amd: 'AMD', - Ars: 'ARS', - Aud: 'AUD', - Azn: 'AZN', - Bam: 'BAM', - Bdt: 'BDT', - Bgn: 'BGN', - Bhd: 'BHD', - Bif: 'BIF', - Bnd: 'BND', - Bob: 'BOB', - Brl: 'BRL', - Bwp: 'BWP', - Byr: 'BYR', - Bzd: 'BZD', - Cdf: 'CDF', - Chf: 'CHF', - Clp: 'CLP', - Cny: 'CNY', - Cop: 'COP', - Crc: 'CRC', - Cve: 'CVE', - Czk: 'CZK', - Djf: 'DJF', - Dkk: 'DKK', - Dop: 'DOP', - Dzd: 'DZD', - Eek: 'EEK', - Egp: 'EGP', - Ern: 'ERN', - Etb: 'ETB', - Gbp: 'GBP', - Gel: 'GEL', - Ghs: 'GHS', - Gnf: 'GNF', - Gtq: 'GTQ', - Hkd: 'HKD', - Hnl: 'HNL', - Hrk: 'HRK', - Huf: 'HUF', - Idr: 'IDR', - Ils: 'ILS', - Inr: 'INR', - Iqd: 'IQD', - Irr: 'IRR', - Isk: 'ISK', - Jmd: 'JMD', - Jod: 'JOD', - Jpy: 'JPY', - Kes: 'KES', - Khr: 'KHR', - Krw: 'KRW', - Kwd: 'KWD', - Kzt: 'KZT', - Lbp: 'LBP', - Lkr: 'LKR', - Ltl: 'LTL', - Lvl: 'LVL', - Mad: 'MAD', - Mdl: 'MDL', - Mga: 'MGA', - Mkd: 'MKD', - Mmk: 'MMK', - Mop: 'MOP', - Mur: 'MUR', - Mxn: 'MXN', - Myr: 'MYR', - Mzn: 'MZN', - Nad: 'NAD', - Ngn: 'NGN', - Nio: 'NIO', - Nok: 'NOK', - Npr: 'NPR', - Nzd: 'NZD', - Omr: 'OMR', - Pab: 'PAB', - Pen: 'PEN', - Php: 'PHP', - Pkr: 'PKR', - Pln: 'PLN', - Pyg: 'PYG', - Qar: 'QAR', - Ron: 'RON', - Rsd: 'RSD', - Rub: 'RUB', - Rwf: 'RWF', - Sar: 'SAR', - Sdg: 'SDG', - Sek: 'SEK', - Sgd: 'SGD', - Sos: 'SOS', - Syp: 'SYP', - Thb: 'THB', - Tnd: 'TND', - Top: 'TOP', - Try: 'TRY', - Ttd: 'TTD', - Twd: 'TWD', - Tzs: 'TZS', - Uah: 'UAH', - Ugx: 'UGX', - Uyu: 'UYU', - Uzs: 'UZS', - Vef: 'VEF', - Vnd: 'VND', - Xaf: 'XAF', - Xof: 'XOF', - Yer: 'YER', - Zar: 'ZAR', - Zmk: 'ZMK' -}; -exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = { - Card: 'card', - Logo: 'logo' -}; -exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = { - Email: 'EMAIL', - Link: 'LINK', - Phone: 'PHONE' -}; -exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = { - Scheduled: 'SCHEDULED', - Failed: 'FAILED', - Succeeded: 'SUCCEEDED', - Pending: 'PENDING' -}; -exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = { - Usd: 'USD', - Cad: 'CAD', - Eur: 'EUR', - Aed: 'AED', - Afn: 'AFN', - All: 'ALL', - Amd: 'AMD', - Ars: 'ARS', - Aud: 'AUD', - Azn: 'AZN', - Bam: 'BAM', - Bdt: 'BDT', - Bgn: 'BGN', - Bhd: 'BHD', - Bif: 'BIF', - Bnd: 'BND', - Bob: 'BOB', - Brl: 'BRL', - Bwp: 'BWP', - Byr: 'BYR', - Bzd: 'BZD', - Cdf: 'CDF', - Chf: 'CHF', - Clp: 'CLP', - Cny: 'CNY', - Cop: 'COP', - Crc: 'CRC', - Cve: 'CVE', - Czk: 'CZK', - Djf: 'DJF', - Dkk: 'DKK', - Dop: 'DOP', - Dzd: 'DZD', - Eek: 'EEK', - Egp: 'EGP', - Ern: 'ERN', - Etb: 'ETB', - Gbp: 'GBP', - Gel: 'GEL', - Ghs: 'GHS', - Gnf: 'GNF', - Gtq: 'GTQ', - Hkd: 'HKD', - Hnl: 'HNL', - Hrk: 'HRK', - Huf: 'HUF', - Idr: 'IDR', - Ils: 'ILS', - Inr: 'INR', - Iqd: 'IQD', - Irr: 'IRR', - Isk: 'ISK', - Jmd: 'JMD', - Jod: 'JOD', - Jpy: 'JPY', - Kes: 'KES', - Khr: 'KHR', - Krw: 'KRW', - Kwd: 'KWD', - Kzt: 'KZT', - Lbp: 'LBP', - Lkr: 'LKR', - Ltl: 'LTL', - Lvl: 'LVL', - Mad: 'MAD', - Mdl: 'MDL', - Mga: 'MGA', - Mkd: 'MKD', - Mmk: 'MMK', - Mop: 'MOP', - Mur: 'MUR', - Mxn: 'MXN', - Myr: 'MYR', - Mzn: 'MZN', - Nad: 'NAD', - Ngn: 'NGN', - Nio: 'NIO', - Nok: 'NOK', - Npr: 'NPR', - Nzd: 'NZD', - Omr: 'OMR', - Pab: 'PAB', - Pen: 'PEN', - Php: 'PHP', - Pkr: 'PKR', - Pln: 'PLN', - Pyg: 'PYG', - Qar: 'QAR', - Ron: 'RON', - Rsd: 'RSD', - Rub: 'RUB', - Rwf: 'RWF', - Sar: 'SAR', - Sdg: 'SDG', - Sek: 'SEK', - Sgd: 'SGD', - Sos: 'SOS', - Syp: 'SYP', - Thb: 'THB', - Tnd: 'TND', - Top: 'TOP', - Try: 'TRY', - Ttd: 'TTD', - Twd: 'TWD', - Tzs: 'TZS', - Uah: 'UAH', - Ugx: 'UGX', - Uyu: 'UYU', - Uzs: 'UZS', - Vef: 'VEF', - Vnd: 'VND', - Xaf: 'XAF', - Xof: 'XOF', - Yer: 'YER', - Zar: 'ZAR', - Zmk: 'ZMK' -}; -exports.MemberStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.MemberBaseStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.MemberWithEventsStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.MemberWithoutEventsStatusEnum = { - Registered: 'REGISTERED', - Invited: 'INVITED' -}; -exports.OrderStatusEnum = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.OrderChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.OrderBaseStatusEnum = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.OrderBaseChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.OrderBasePaymentChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -/** - * Execution status of a given order
Status Description
CANCELED The order and all of its rewards were canceled.
CART The order has been created, but hasn\'t yet been processed.
EXECUTED The order has been executed. Payment has been handled and rewards are being delivered (if applicable).
FAILED The order could not be processed due to an error. E.g. due to insufficient funds in the account.
PENDING APPROVAL The order has been created but needs approval to be executed.
PENDING INTERNAL PAYMENT APPROVAL The order has been created but it is under review and requires approval from our team.
- * @export - * @enum {string} - */ -exports.OrderStatus = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.OrderWithoutLinkStatusEnum = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.OrderWithoutLinkChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.OrganizationStatusEnum = { - Pending: 'PENDING', - Approved: 'APPROVED', - Rejected: 'REJECTED' -}; -exports.PaymentDetailsChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.ProductCategoryEnum = { - Ach: 'ach', - Charity: 'charity', - MerchantCard: 'merchant_card', - Paypal: 'paypal', - Venmo: 'venmo', - VisaCard: 'visa_card' -}; -exports.ProductCurrencyCodesEnum = { - Usd: 'USD', - Cad: 'CAD', - Eur: 'EUR', - Aed: 'AED', - Afn: 'AFN', - All: 'ALL', - Amd: 'AMD', - Ars: 'ARS', - Aud: 'AUD', - Azn: 'AZN', - Bam: 'BAM', - Bdt: 'BDT', - Bgn: 'BGN', - Bhd: 'BHD', - Bif: 'BIF', - Bnd: 'BND', - Bob: 'BOB', - Brl: 'BRL', - Bwp: 'BWP', - Byr: 'BYR', - Bzd: 'BZD', - Cdf: 'CDF', - Chf: 'CHF', - Clp: 'CLP', - Cny: 'CNY', - Cop: 'COP', - Crc: 'CRC', - Cve: 'CVE', - Czk: 'CZK', - Djf: 'DJF', - Dkk: 'DKK', - Dop: 'DOP', - Dzd: 'DZD', - Eek: 'EEK', - Egp: 'EGP', - Ern: 'ERN', - Etb: 'ETB', - Gbp: 'GBP', - Gel: 'GEL', - Ghs: 'GHS', - Gnf: 'GNF', - Gtq: 'GTQ', - Hkd: 'HKD', - Hnl: 'HNL', - Hrk: 'HRK', - Huf: 'HUF', - Idr: 'IDR', - Ils: 'ILS', - Inr: 'INR', - Iqd: 'IQD', - Irr: 'IRR', - Isk: 'ISK', - Jmd: 'JMD', - Jod: 'JOD', - Jpy: 'JPY', - Kes: 'KES', - Khr: 'KHR', - Krw: 'KRW', - Kwd: 'KWD', - Kzt: 'KZT', - Lbp: 'LBP', - Lkr: 'LKR', - Ltl: 'LTL', - Lvl: 'LVL', - Mad: 'MAD', - Mdl: 'MDL', - Mga: 'MGA', - Mkd: 'MKD', - Mmk: 'MMK', - Mop: 'MOP', - Mur: 'MUR', - Mxn: 'MXN', - Myr: 'MYR', - Mzn: 'MZN', - Nad: 'NAD', - Ngn: 'NGN', - Nio: 'NIO', - Nok: 'NOK', - Npr: 'NPR', - Nzd: 'NZD', - Omr: 'OMR', - Pab: 'PAB', - Pen: 'PEN', - Php: 'PHP', - Pkr: 'PKR', - Pln: 'PLN', - Pyg: 'PYG', - Qar: 'QAR', - Ron: 'RON', - Rsd: 'RSD', - Rub: 'RUB', - Rwf: 'RWF', - Sar: 'SAR', - Sdg: 'SDG', - Sek: 'SEK', - Sgd: 'SGD', - Sos: 'SOS', - Syp: 'SYP', - Thb: 'THB', - Tnd: 'TND', - Top: 'TOP', - Try: 'TRY', - Ttd: 'TTD', - Twd: 'TWD', - Tzs: 'TZS', - Uah: 'UAH', - Ugx: 'UGX', - Uyu: 'UYU', - Uzs: 'UZS', - Vef: 'VEF', - Vnd: 'VND', - Xaf: 'XAF', - Xof: 'XOF', - Yer: 'YER', - Zar: 'ZAR', - Zmk: 'ZMK' -}; -exports.ReviewCountryTypeEnum = { - Whitelist: 'whitelist', - Blacklist: 'blacklist' -}; -exports.ReviewRedeemedRewardsAmountPeriodEnum = { - _7: '7', - _30: '30', - _90: '90', - _120: '120', - _365: '365', - AllTime: 'all_time' -}; -exports.ReviewRedeemedRewardsCountPeriodEnum = { - _7: '7', - _30: '30', - _90: '90', - _120: '120', - _365: '365', - AllTime: 'all_time' -}; -exports.RewardValueCurrencyCodeEnum = { - Usd: 'USD', - Cad: 'CAD', - Eur: 'EUR', - Aed: 'AED', - Afn: 'AFN', - All: 'ALL', - Amd: 'AMD', - Ars: 'ARS', - Aud: 'AUD', - Azn: 'AZN', - Bam: 'BAM', - Bdt: 'BDT', - Bgn: 'BGN', - Bhd: 'BHD', - Bif: 'BIF', - Bnd: 'BND', - Bob: 'BOB', - Brl: 'BRL', - Bwp: 'BWP', - Byr: 'BYR', - Bzd: 'BZD', - Cdf: 'CDF', - Chf: 'CHF', - Clp: 'CLP', - Cny: 'CNY', - Cop: 'COP', - Crc: 'CRC', - Cve: 'CVE', - Czk: 'CZK', - Djf: 'DJF', - Dkk: 'DKK', - Dop: 'DOP', - Dzd: 'DZD', - Eek: 'EEK', - Egp: 'EGP', - Ern: 'ERN', - Etb: 'ETB', - Gbp: 'GBP', - Gel: 'GEL', - Ghs: 'GHS', - Gnf: 'GNF', - Gtq: 'GTQ', - Hkd: 'HKD', - Hnl: 'HNL', - Hrk: 'HRK', - Huf: 'HUF', - Idr: 'IDR', - Ils: 'ILS', - Inr: 'INR', - Iqd: 'IQD', - Irr: 'IRR', - Isk: 'ISK', - Jmd: 'JMD', - Jod: 'JOD', - Jpy: 'JPY', - Kes: 'KES', - Khr: 'KHR', - Krw: 'KRW', - Kwd: 'KWD', - Kzt: 'KZT', - Lbp: 'LBP', - Lkr: 'LKR', - Ltl: 'LTL', - Lvl: 'LVL', - Mad: 'MAD', - Mdl: 'MDL', - Mga: 'MGA', - Mkd: 'MKD', - Mmk: 'MMK', - Mop: 'MOP', - Mur: 'MUR', - Mxn: 'MXN', - Myr: 'MYR', - Mzn: 'MZN', - Nad: 'NAD', - Ngn: 'NGN', - Nio: 'NIO', - Nok: 'NOK', - Npr: 'NPR', - Nzd: 'NZD', - Omr: 'OMR', - Pab: 'PAB', - Pen: 'PEN', - Php: 'PHP', - Pkr: 'PKR', - Pln: 'PLN', - Pyg: 'PYG', - Qar: 'QAR', - Ron: 'RON', - Rsd: 'RSD', - Rub: 'RUB', - Rwf: 'RWF', - Sar: 'SAR', - Sdg: 'SDG', - Sek: 'SEK', - Sgd: 'SGD', - Sos: 'SOS', - Syp: 'SYP', - Thb: 'THB', - Tnd: 'TND', - Top: 'TOP', - Try: 'TRY', - Ttd: 'TTD', - Twd: 'TWD', - Tzs: 'TZS', - Uah: 'UAH', - Ugx: 'UGX', - Uyu: 'UYU', - Uzs: 'UZS', - Vef: 'VEF', - Vnd: 'VND', - Xaf: 'XAF', - Xof: 'XOF', - Yer: 'YER', - Zar: 'ZAR', - Zmk: 'ZMK' -}; -exports.RewardWithoutLinkDeliveryMethodEnum = { - Email: 'EMAIL', - Link: 'LINK', - Phone: 'PHONE' -}; -exports.RewardWithoutLinkDeliveryStatusEnum = { - Scheduled: 'SCHEDULED', - Failed: 'FAILED', - Succeeded: 'SUCCEEDED', - Pending: 'PENDING' -}; -exports.SingleRewardOrder1RewardDeliveryMethodEnum = { - Email: 'EMAIL', - Link: 'LINK', - Phone: 'PHONE' -}; -exports.SingleRewardOrderWithoutLinkOrderStatusEnum = { - Canceled: 'CANCELED', - Cart: 'CART', - Executed: 'EXECUTED', - Failed: 'FAILED', - PendingApproval: 'PENDING APPROVAL', - PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL' -}; -exports.SingleRewardOrderWithoutLinkOrderChannelEnum = { - Ui: 'UI', - Api: 'API', - Embed: 'EMBED', - Decipher: 'DECIPHER', - Qualtrics: 'QUALTRICS', - Typeform: 'TYPEFORM', - SurveyMonkey: 'SURVEY MONKEY' -}; -exports.UpdateFraudRuleListRequestOperationEnum = { - Add: 'add', - Remove: 'remove' -}; -/** - * BalanceTransactionsApi - axios parameter creator - * @export - */ -const BalanceTransactionsApiAxiosParamCreator = function (configuration) { - return { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions: (offset_1, limit_1, createdAtGte_1, createdAtLte_1, ...args_1) => __awaiter(this, [offset_1, limit_1, createdAtGte_1, createdAtLte_1, ...args_1], void 0, function* (offset, limit, createdAtGte, createdAtLte, options = {}) { - const localVarPath = `/balance_transactions`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - if (createdAtGte !== undefined) { - localVarQueryParameter['created_at[gte]'] = createdAtGte; - } - if (createdAtLte !== undefined) { - localVarQueryParameter['created_at[lte]'] = createdAtLte; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.BalanceTransactionsApiAxiosParamCreator = BalanceTransactionsApiAxiosParamCreator; -/** - * BalanceTransactionsApi - functional programming interface - * @export - */ -const BalanceTransactionsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.BalanceTransactionsApiAxiosParamCreator)(configuration); - return { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BalanceTransactionsApi.listBalanceTransactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.BalanceTransactionsApiFp = BalanceTransactionsApiFp; -/** - * BalanceTransactionsApi - factory interface - * @export - */ -const BalanceTransactionsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.BalanceTransactionsApiFp)(configuration); - return { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) { - return localVarFp.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.BalanceTransactionsApiFactory = BalanceTransactionsApiFactory; -/** - * BalanceTransactionsApi - object-oriented interface - * @export - * @class BalanceTransactionsApi - * @extends {BaseAPI} - */ -class BalanceTransactionsApi extends base_1.BaseAPI { - /** - * Fetch a list of all balance transactions on your account. - * @summary List balance transactions - * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of transactions listed. The default value is 10. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof BalanceTransactionsApi - */ - listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) { - return (0, exports.BalanceTransactionsApiFp)(this.configuration).listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.BalanceTransactionsApi = BalanceTransactionsApi; -/** - * CampaignsApi - axios parameter creator - * @export - */ -const CampaignsApiAxiosParamCreator = function (configuration) { - return { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign: (createCampaignRequest_1, ...args_1) => __awaiter(this, [createCampaignRequest_1, ...args_1], void 0, function* (createCampaignRequest, options = {}) { - // verify required parameter 'createCampaignRequest' is not null or undefined - (0, common_1.assertParamExists)('createCampaign', 'createCampaignRequest', createCampaignRequest); - const localVarPath = `/campaigns`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCampaignRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getCampaign', 'id', id); - const localVarPath = `/campaigns/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/campaigns`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign: (id_1, updateCampaignRequest_1, ...args_1) => __awaiter(this, [id_1, updateCampaignRequest_1, ...args_1], void 0, function* (id, updateCampaignRequest, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('updateCampaign', 'id', id); - // verify required parameter 'updateCampaignRequest' is not null or undefined - (0, common_1.assertParamExists)('updateCampaign', 'updateCampaignRequest', updateCampaignRequest); - const localVarPath = `/campaigns/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCampaignRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.CampaignsApiAxiosParamCreator = CampaignsApiAxiosParamCreator; -/** - * CampaignsApi - functional programming interface - * @export - */ -const CampaignsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.CampaignsApiAxiosParamCreator)(configuration); - return { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign(createCampaignRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createCampaign(createCampaignRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.createCampaign']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaign(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.getCampaign']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listCampaigns(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.listCampaigns']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign(id, updateCampaignRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCampaign(id, updateCampaignRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.updateCampaign']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.CampaignsApiFp = CampaignsApiFp; -/** - * CampaignsApi - factory interface - * @export - */ -const CampaignsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.CampaignsApiFp)(configuration); - return { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createCampaign(createCampaignRequest, options) { - return localVarFp.createCampaign(createCampaignRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCampaign(id, options) { - return localVarFp.getCampaign(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listCampaigns(options) { - return localVarFp.listCampaigns(options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateCampaign(id, updateCampaignRequest, options) { - return localVarFp.updateCampaign(id, updateCampaignRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.CampaignsApiFactory = CampaignsApiFactory; -/** - * CampaignsApi - object-oriented interface - * @export - * @class CampaignsApi - * @extends {BaseAPI} - */ -class CampaignsApi extends base_1.BaseAPI { - /** - * - * @summary Create campaign - * @param {CreateCampaignRequest} createCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - createCampaign(createCampaignRequest, options) { - return (0, exports.CampaignsApiFp)(this.configuration).createCampaign(createCampaignRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a campaign, identified by the given `id` in the URL - * @summary Retrieve campaign - * @param {string} id ID of the campaign that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - getCampaign(id, options) { - return (0, exports.CampaignsApiFp)(this.configuration).getCampaign(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a list of all campaigns created in your account - * @summary List campaigns - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - listCampaigns(options) { - return (0, exports.CampaignsApiFp)(this.configuration).listCampaigns(options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Update campaign - * @param {string} id ID of the campaign that should be updated - * @param {UpdateCampaignRequest} updateCampaignRequest Campaign details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CampaignsApi - */ - updateCampaign(id, updateCampaignRequest, options) { - return (0, exports.CampaignsApiFp)(this.configuration).updateCampaign(id, updateCampaignRequest, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.CampaignsApi = CampaignsApi; -/** - * FieldsApi - axios parameter creator - * @export - */ -const FieldsApiAxiosParamCreator = function (configuration) { - return { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/fields`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.FieldsApiAxiosParamCreator = FieldsApiAxiosParamCreator; -/** - * FieldsApi - functional programming interface - * @export - */ -const FieldsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.FieldsApiAxiosParamCreator)(configuration); - return { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listFields(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FieldsApi.listFields']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.FieldsApiFp = FieldsApiFp; -/** - * FieldsApi - factory interface - * @export - */ -const FieldsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.FieldsApiFp)(configuration); - return { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFields(options) { - return localVarFp.listFields(options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.FieldsApiFactory = FieldsApiFactory; -/** - * FieldsApi - object-oriented interface - * @export - * @class FieldsApi - * @extends {BaseAPI} - */ -class FieldsApi extends base_1.BaseAPI { - /** - * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard. - * @summary List fields - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FieldsApi - */ - listFields(options) { - return (0, exports.FieldsApiFp)(this.configuration).listFields(options).then((request) => request(this.axios, this.basePath)); - } -} -exports.FieldsApi = FieldsApi; -/** - * ForexApi - axios parameter creator - * @export - */ -const ForexApiAxiosParamCreator = function (configuration) { - return { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex: (base_2, ...args_1) => __awaiter(this, [base_2, ...args_1], void 0, function* (base, options = {}) { - const localVarPath = `/forex`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (base !== undefined) { - localVarQueryParameter['base'] = base; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.ForexApiAxiosParamCreator = ForexApiAxiosParamCreator; -/** - * ForexApi - functional programming interface - * @export - */ -const ForexApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.ForexApiAxiosParamCreator)(configuration); - return { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex(base, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listForex(base, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ForexApi.listForex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.ForexApiFp = ForexApiFp; -/** - * ForexApi - factory interface - * @export - */ -const ForexApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.ForexApiFp)(configuration); - return { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listForex(base, options) { - return localVarFp.listForex(base, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.ForexApiFactory = ForexApiFactory; -/** - * ForexApi - object-oriented interface - * @export - * @class ForexApi - * @extends {BaseAPI} - */ -class ForexApi extends base_1.BaseAPI { - /** - * Retrieve a list of exchange rates - * @summary List exchange rates - * @param {string} [base] Base currency code, default is USD. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ForexApi - */ - listForex(base, options) { - return (0, exports.ForexApiFp)(this.configuration).listForex(base, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.ForexApi = ForexApi; -/** - * FraudReviewsApi - axios parameter creator - * @export - */ -const FraudReviewsApiAxiosParamCreator = function (configuration) { - return { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('blockFraudReview', 'id', id); - const localVarPath = `/fraud_reviews/{id}/block` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getFraudReview', 'id', id); - const localVarPath = `/fraud_reviews/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews: (offset_1, limit_1, status_1, createdAtGte_1, createdAtLte_1, redeemedAtGte_1, redeemedAtLte_1, ...args_1) => __awaiter(this, [offset_1, limit_1, status_1, createdAtGte_1, createdAtLte_1, redeemedAtGte_1, redeemedAtLte_1, ...args_1], void 0, function* (offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options = {}) { - const localVarPath = `/fraud_reviews`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - if (status !== undefined) { - localVarQueryParameter['status'] = status; - } - if (createdAtGte !== undefined) { - localVarQueryParameter['created_at[gte]'] = createdAtGte; - } - if (createdAtLte !== undefined) { - localVarQueryParameter['created_at[lte]'] = createdAtLte; - } - if (redeemedAtGte !== undefined) { - localVarQueryParameter['redeemed_at[gte]'] = redeemedAtGte; - } - if (redeemedAtLte !== undefined) { - localVarQueryParameter['redeemed_at[lte]'] = redeemedAtLte; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('releaseFraudReview', 'id', id); - const localVarPath = `/fraud_reviews/{id}/release` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.FraudReviewsApiAxiosParamCreator = FraudReviewsApiAxiosParamCreator; -/** - * FraudReviewsApi - functional programming interface - * @export - */ -const FraudReviewsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.FraudReviewsApiAxiosParamCreator)(configuration); - return { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.blockFraudReview(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.blockFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getFraudReview(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.getFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.listFraudReviews']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.releaseFraudReview(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudReviewsApi.releaseFraudReview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.FraudReviewsApiFp = FraudReviewsApiFp; -/** - * FraudReviewsApi - factory interface - * @export - */ -const FraudReviewsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.FraudReviewsApiFp)(configuration); - return { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - blockFraudReview(id, options) { - return localVarFp.blockFraudReview(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFraudReview(id, options) { - return localVarFp.getFraudReview(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) { - return localVarFp.listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(axios, basePath)); - }, - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - releaseFraudReview(id, options) { - return localVarFp.releaseFraudReview(id, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.FraudReviewsApiFactory = FraudReviewsApiFactory; -/** - * FraudReviewsApi - object-oriented interface - * @export - * @class FraudReviewsApi - * @extends {BaseAPI} - */ -class FraudReviewsApi extends base_1.BaseAPI { - /** - * Completes the fraud review identified by the given `id` in the URL, and blocks the reward. The reward is canceled and the amount refunded. - * @summary Block fraud review - * @param {string} id The ID of the reward that should be blocked. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - blockFraudReview(id, options) { - return (0, exports.FraudReviewsApiFp)(this.configuration).blockFraudReview(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve the details of a fraud review, identified by the given `id` in the URL. Returns additional details regarding the fraud review beyond what\'s provided in the List fraud reviews endpoint, including reward details, recipient geolocation, etc. - * @summary Retrieve single fraud review - * @param {string} id The ID of the reward that should be retrieved. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - getFraudReview(id, options) { - return (0, exports.FraudReviewsApiFp)(this.configuration).getFraudReview(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a paginated list of all fraud reviews. List can be filtered by status, created or redeemed at dates. - * @summary List fraud reviews - * @param {number} [offset] Offsets the returned list by the given number of records. The returned fraud reviews are ordered (and offsetted) by their redemption date (DESC). - * @param {number} [limit] Limits the number of fraud reviews listed. The default value is 10. - * @param {ListFraudReviewsStatusEnum} [status] Filters fraud reviews by status. Can be `flagged`, `blocked` or `released`. - * @param {string} [createdAtGte] Return results where the created_at field is >= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [createdAtLte] Return results where the created_at field is <= to the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtGte] Return results where the redeemed_at field is >= the supplied value. Expects an ISO 8601 datetime. - * @param {string} [redeemedAtLte] Return results where the redeemed_at field is <= the supplied value. Expects an ISO 8601 datetime. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options) { - return (0, exports.FraudReviewsApiFp)(this.configuration).listFraudReviews(offset, limit, status, createdAtGte, createdAtLte, redeemedAtGte, redeemedAtLte, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Completes the fraud review identified by the given `id` in the URL, and releases the associated reward to the recipient. - * @summary Release fraud review - * @param {string} id The ID of the reward that should be released. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudReviewsApi - */ - releaseFraudReview(id, options) { - return (0, exports.FraudReviewsApiFp)(this.configuration).releaseFraudReview(id, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.FraudReviewsApi = FraudReviewsApi; -/** - * @export - */ -exports.ListFraudReviewsStatusEnum = { - Flagged: 'flagged', - Blocked: 'blocked', - Released: 'released' -}; -/** - * FraudRulesApi - axios parameter creator - * @export - */ -const FraudRulesApiAxiosParamCreator = function (configuration) { - return { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule: (ruleType_1, ...args_1) => __awaiter(this, [ruleType_1, ...args_1], void 0, function* (ruleType, options = {}) { - // verify required parameter 'ruleType' is not null or undefined - (0, common_1.assertParamExists)('deleteFraudRule', 'ruleType', ruleType); - const localVarPath = `/fraud_rules/{rule_type}` - .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule: (ruleType_1, fraudRuleRequest_1, ...args_1) => __awaiter(this, [ruleType_1, fraudRuleRequest_1, ...args_1], void 0, function* (ruleType, fraudRuleRequest, options = {}) { - // verify required parameter 'ruleType' is not null or undefined - (0, common_1.assertParamExists)('fraudRule', 'ruleType', ruleType); - const localVarPath = `/fraud_rules/{rule_type}` - .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(fraudRuleRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/fraud_rules`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList: (ruleType_1, updateFraudRuleListRequest_1, ...args_1) => __awaiter(this, [ruleType_1, updateFraudRuleListRequest_1, ...args_1], void 0, function* (ruleType, updateFraudRuleListRequest, options = {}) { - // verify required parameter 'ruleType' is not null or undefined - (0, common_1.assertParamExists)('updateFraudRuleList', 'ruleType', ruleType); - // verify required parameter 'updateFraudRuleListRequest' is not null or undefined - (0, common_1.assertParamExists)('updateFraudRuleList', 'updateFraudRuleListRequest', updateFraudRuleListRequest); - const localVarPath = `/fraud_rules/{rule_type}/update_list` - .replace(`{${"rule_type"}}`, encodeURIComponent(String(ruleType))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateFraudRuleListRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.FraudRulesApiAxiosParamCreator = FraudRulesApiAxiosParamCreator; -/** - * FraudRulesApi - functional programming interface - * @export - */ -const FraudRulesApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.FraudRulesApiAxiosParamCreator)(configuration); - return { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule(ruleType, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteFraudRule(ruleType, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.deleteFraudRule']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule(ruleType, fraudRuleRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.fraudRule(ruleType, fraudRuleRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.fraudRule']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listFraudRules(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.listFraudRules']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FraudRulesApi.updateFraudRuleList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.FraudRulesApiFp = FraudRulesApiFp; -/** - * FraudRulesApi - factory interface - * @export - */ -const FraudRulesApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.FraudRulesApiFp)(configuration); - return { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteFraudRule(ruleType, options) { - return localVarFp.deleteFraudRule(ruleType, options).then((request) => request(axios, basePath)); - }, - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - fraudRule(ruleType, fraudRuleRequest, options) { - return localVarFp.fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(axios, basePath)); - }, - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFraudRules(options) { - return localVarFp.listFraudRules(options).then((request) => request(axios, basePath)); - }, - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) { - return localVarFp.updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.FraudRulesApiFactory = FraudRulesApiFactory; -/** - * FraudRulesApi - object-oriented interface - * @export - * @class FraudRulesApi - * @extends {BaseAPI} - */ -class FraudRulesApi extends base_1.BaseAPI { - /** - * Deletes the rule of the type passed in the URL. - * @summary Delete fraud rule - * @param {DeleteFraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - deleteFraudRule(ruleType, options) { - return (0, exports.FraudRulesApiFp)(this.configuration).deleteFraudRule(ruleType, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Configure a fraud rule of the type passed in the URL. If a rule of the same type already exists, it will be overwritten. - * @summary Configure fraud rule - * @param {FraudRuleRuleTypeEnum} ruleType The rule type to create or update. - * @param {FraudRuleRequest} [fraudRuleRequest] Rules `review_multiple_emails`, `review_vpn`, `review_tremendous_flaglist`, and `review_previously_blocked_recipients` require no body. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - fraudRule(ruleType, fraudRuleRequest, options) { - return (0, exports.FraudRulesApiFp)(this.configuration).fraudRule(ruleType, fraudRuleRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * List active fraud rules associated with the organization tied to your API key. - * @summary List fraud rules - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - listFraudRules(options) { - return (0, exports.FraudRulesApiFp)(this.configuration).listFraudRules(options).then((request) => request(this.axios, this.basePath)); - } - /** - * Use this endpoint to modify a list associated with an already-configured rule. Add and remove operations supported. For example, to append new IPs to the `review_ip` rule, a valid JSON body would be: ```json { \"operation\": \"add\", \"config\": { \"ips\": [\"123.123.123.123\"] } } ``` - * @summary Update fraud rule list - * @param {UpdateFraudRuleListRuleTypeEnum} ruleType The rule type to create or update. - * @param {UpdateFraudRuleListRequest} updateFraudRuleListRequest The lists to add or remove from the current configuration - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FraudRulesApi - */ - updateFraudRuleList(ruleType, updateFraudRuleListRequest, options) { - return (0, exports.FraudRulesApiFp)(this.configuration).updateFraudRuleList(ruleType, updateFraudRuleListRequest, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.FraudRulesApi = FraudRulesApi; -/** - * @export - */ -exports.DeleteFraudRuleRuleTypeEnum = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count', - ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount', - ReviewMultipleEmails: 'review_multiple_emails', - ReviewVpn: 'review_vpn', - ReviewTremendousFlagList: 'review_tremendous_flag_list', - ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -/** - * @export - */ -exports.FraudRuleRuleTypeEnum = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - ReviewRedeemedRewardsCount: 'review_redeemed_rewards_count', - ReviewRedeemedRewardsAmount: 'review_redeemed_rewards_amount', - ReviewMultipleEmails: 'review_multiple_emails', - ReviewVpn: 'review_vpn', - ReviewTremendousFlagList: 'review_tremendous_flag_list', - ReviewPreviouslyBlockedRecipients: 'review_previously_blocked_recipients', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -/** - * @export - */ -exports.UpdateFraudRuleListRuleTypeEnum = { - ReviewCountry: 'review_country', - ReviewIp: 'review_ip', - ReviewEmail: 'review_email', - AllowIp: 'allow_ip', - AllowEmail: 'allow_email' -}; -/** - * FundingSourcesApi - axios parameter creator - * @export - */ -const FundingSourcesApiAxiosParamCreator = function (configuration) { - return { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getFundingSource', 'id', id); - const localVarPath = `/funding_sources/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/funding_sources`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.FundingSourcesApiAxiosParamCreator = FundingSourcesApiAxiosParamCreator; -/** - * FundingSourcesApi - functional programming interface - * @export - */ -const FundingSourcesApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.FundingSourcesApiAxiosParamCreator)(configuration); - return { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getFundingSource(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.getFundingSource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listFundingSources(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.listFundingSources']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.FundingSourcesApiFp = FundingSourcesApiFp; -/** - * FundingSourcesApi - factory interface - * @export - */ -const FundingSourcesApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.FundingSourcesApiFp)(configuration); - return { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getFundingSource(id, options) { - return localVarFp.getFundingSource(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listFundingSources(options) { - return localVarFp.listFundingSources(options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.FundingSourcesApiFactory = FundingSourcesApiFactory; -/** - * FundingSourcesApi - object-oriented interface - * @export - * @class FundingSourcesApi - * @extends {BaseAPI} - */ -class FundingSourcesApi extends base_1.BaseAPI { - /** - * Retrieve a funding source, identified by the given `id` in the URL - * @summary Retrieve funding source - * @param {string} id ID of the funding source that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FundingSourcesApi - */ - getFundingSource(id, options) { - return (0, exports.FundingSourcesApiFp)(this.configuration).getFundingSource(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account. - * @summary List funding sources - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof FundingSourcesApi - */ - listFundingSources(options) { - return (0, exports.FundingSourcesApiFp)(this.configuration).listFundingSources(options).then((request) => request(this.axios, this.basePath)); - } -} -exports.FundingSourcesApi = FundingSourcesApi; -/** - * InvoicesApi - axios parameter creator - * @export - */ -const InvoicesApiAxiosParamCreator = function (configuration) { - return { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice: (createInvoiceRequest_1, ...args_1) => __awaiter(this, [createInvoiceRequest_1, ...args_1], void 0, function* (createInvoiceRequest, options = {}) { - // verify required parameter 'createInvoiceRequest' is not null or undefined - (0, common_1.assertParamExists)('createInvoice', 'createInvoiceRequest', createInvoiceRequest); - const localVarPath = `/invoices`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('deleteInvoices', 'id', id); - const localVarPath = `/invoices/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('downloadInvoiceCsv', 'id', id); - const localVarPath = `/invoices/{id}/csv` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('downloadInvoicePdf', 'id', id); - const localVarPath = `/invoices/{id}/pdf` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getInvoice', 'id', id); - const localVarPath = `/invoices/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices: (offset_1, limit_1, ...args_1) => __awaiter(this, [offset_1, limit_1, ...args_1], void 0, function* (offset, limit, options = {}) { - const localVarPath = `/invoices`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator; -/** - * InvoicesApi - functional programming interface - * @export - */ -const InvoicesApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration); - return { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice(createInvoiceRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createInvoice(createInvoiceRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.createInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInvoices(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.deleteInvoices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoiceCsv(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoiceCsv']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoicePdf(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoicePdf']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getInvoice(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.getInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices(offset, limit, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listInvoices(offset, limit, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.listInvoices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.InvoicesApiFp = InvoicesApiFp; -/** - * InvoicesApi - factory interface - * @export - */ -const InvoicesApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.InvoicesApiFp)(configuration); - return { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createInvoice(createInvoiceRequest, options) { - return localVarFp.createInvoice(createInvoiceRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteInvoices(id, options) { - return localVarFp.deleteInvoices(id, options).then((request) => request(axios, basePath)); - }, - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoiceCsv(id, options) { - return localVarFp.downloadInvoiceCsv(id, options).then((request) => request(axios, basePath)); - }, - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - downloadInvoicePdf(id, options) { - return localVarFp.downloadInvoicePdf(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getInvoice(id, options) { - return localVarFp.getInvoice(id, options).then((request) => request(axios, basePath)); - }, - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listInvoices(offset, limit, options) { - return localVarFp.listInvoices(offset, limit, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.InvoicesApiFactory = InvoicesApiFactory; -/** - * InvoicesApi - object-oriented interface - * @export - * @class InvoicesApi - * @extends {BaseAPI} - */ -class InvoicesApi extends base_1.BaseAPI { - /** - * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body
Property Type Description
po_number
string

Reference to the purchase order number within your organization

amount
number double

Amount of the invoice in USD

memo
string

A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.

- * @summary Create invoice - * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - createInvoice(createInvoiceRequest, options) { - return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(createInvoiceRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Removes an invoice. This has no further consequences but is a rather cosmetic operation. - * @summary Delete invoice - * @param {string} id ID of the invoice that should be removed - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - deleteInvoices(id, options) { - return (0, exports.InvoicesApiFp)(this.configuration).deleteInvoices(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Generates a CSV version for an invoice listing the associated rewards and orders - * @summary Retrieve invoice as CSV - * @param {string} id ID of the Invoice for that the CSV should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - downloadInvoiceCsv(id, options) { - return (0, exports.InvoicesApiFp)(this.configuration).downloadInvoiceCsv(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Generates a PDF version for an invoice - * @summary Retrieve invoice as PDF - * @param {string} id ID of the Invoice for that the PDF should be generated - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - downloadInvoicePdf(id, options) { - return (0, exports.InvoicesApiFp)(this.configuration).downloadInvoicePdf(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits. - * @summary Retrieve invoice - * @param {string} id ID of the invoice that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - getInvoice(id, options) { - return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices. - * @summary List invoices - * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC). - * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof InvoicesApi - */ - listInvoices(offset, limit, options) { - return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(offset, limit, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.InvoicesApi = InvoicesApi; -/** - * MembersApi - axios parameter creator - * @export - */ -const MembersApiAxiosParamCreator = function (configuration) { - return { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember: (createMemberRequest_1, ...args_1) => __awaiter(this, [createMemberRequest_1, ...args_1], void 0, function* (createMemberRequest, options = {}) { - // verify required parameter 'createMemberRequest' is not null or undefined - (0, common_1.assertParamExists)('createMember', 'createMemberRequest', createMemberRequest); - const localVarPath = `/members`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createMemberRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getMember', 'id', id); - const localVarPath = `/members/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/members`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.MembersApiAxiosParamCreator = MembersApiAxiosParamCreator; -/** - * MembersApi - functional programming interface - * @export - */ -const MembersApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.MembersApiAxiosParamCreator)(configuration); - return { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember(createMemberRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createMember(createMemberRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.createMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getMember(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.getMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listMembers(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.listMembers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.MembersApiFp = MembersApiFp; -/** - * MembersApi - factory interface - * @export - */ -const MembersApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.MembersApiFp)(configuration); - return { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createMember(createMemberRequest, options) { - return localVarFp.createMember(createMemberRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMember(id, options) { - return localVarFp.getMember(id, options).then((request) => request(axios, basePath)); - }, - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listMembers(options) { - return localVarFp.listMembers(options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.MembersApiFactory = MembersApiFactory; -/** - * MembersApi - object-oriented interface - * @export - * @class MembersApi - * @extends {BaseAPI} - */ -class MembersApi extends base_1.BaseAPI { - /** - * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have a role that determine their permissions within the organization. Check the Roles API for the available roles. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead. - * @summary Create member - * @param {CreateMemberRequest} createMemberRequest Member details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - createMember(createMemberRequest, options) { - return (0, exports.MembersApiFp)(this.configuration).createMember(createMemberRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Retrieve member - * @param {string} id ID of the member to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - getMember(id, options) { - return (0, exports.MembersApiFp)(this.configuration).getMember(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request. - * @summary List members - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof MembersApi - */ - listMembers(options) { - return (0, exports.MembersApiFp)(this.configuration).listMembers(options).then((request) => request(this.axios, this.basePath)); - } -} -exports.MembersApi = MembersApi; -/** - * OrdersApi - axios parameter creator - * @export - */ -const OrdersApiAxiosParamCreator = function (configuration) { - return { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('approveOrder', 'id', id); - const localVarPath = `/order_approvals/{id}/approve` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder: (createOrderRequest_1, ...args_1) => __awaiter(this, [createOrderRequest_1, ...args_1], void 0, function* (createOrderRequest, options = {}) { - // verify required parameter 'createOrderRequest' is not null or undefined - (0, common_1.assertParamExists)('createOrder', 'createOrderRequest', createOrderRequest); - const localVarPath = `/orders`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrderRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getOrder', 'id', id); - const localVarPath = `/orders/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders: (offset_1, campaignId_1, externalId_1, createdAtGte_1, createdAtLte_1, limit_1, ...args_1) => __awaiter(this, [offset_1, campaignId_1, externalId_1, createdAtGte_1, createdAtLte_1, limit_1, ...args_1], void 0, function* (offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options = {}) { - const localVarPath = `/orders`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - if (campaignId !== undefined) { - localVarQueryParameter['campaign_id'] = campaignId; - } - if (externalId !== undefined) { - localVarQueryParameter['external_id'] = externalId; - } - if (createdAtGte !== undefined) { - localVarQueryParameter['created_at[gte]'] = createdAtGte; - } - if (createdAtLte !== undefined) { - localVarQueryParameter['created_at[lte]'] = createdAtLte; - } - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('rejectOrder', 'id', id); - const localVarPath = `/order_approvals/{id}/reject` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.OrdersApiAxiosParamCreator = OrdersApiAxiosParamCreator; -/** - * OrdersApi - functional programming interface - * @export - */ -const OrdersApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.OrdersApiAxiosParamCreator)(configuration); - return { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.approveOrder(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.approveOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder(createOrderRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.listOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.rejectOrder(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.rejectOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.OrdersApiFp = OrdersApiFp; -/** - * OrdersApi - factory interface - * @export - */ -const OrdersApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.OrdersApiFp)(configuration); - return { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - approveOrder(id, options) { - return localVarFp.approveOrder(id, options).then((request) => request(axios, basePath)); - }, - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrder(createOrderRequest, options) { - return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrder(id, options) { - return localVarFp.getOrder(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) { - return localVarFp.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options).then((request) => request(axios, basePath)); - }, - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - rejectOrder(id, options) { - return localVarFp.rejectOrder(id, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.OrdersApiFactory = OrdersApiFactory; -/** - * OrdersApi - object-oriented interface - * @export - * @class OrdersApi - * @extends {BaseAPI} - */ -class OrdersApi extends base_1.BaseAPI { - /** - * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Approve order - * @param {string} id ID of the order that should be approved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - approveOrder(id, options) { - return (0, exports.OrdersApiFp)(this.configuration).approveOrder(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > Check it out! ## Request body
Property Type Description
external_id
string

Reference for this order, supplied by the customer.

When set, external_id makes order idempotent. All requests that use the same external_id after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a 201 response code. These responses fail to create any further orders.

It also allows for retrieving by external_id instead of id only.

payment
object
Show object properties
Property Type Description
funding_source_id
string

Tremendous ID of the funding source that will be used to pay for the order. Use balance to use your Tremendous's balance.

reward
object

A single reward, sent to a recipient. A reward is always part of an order.

Either products or campaign_id must be specified.

Show object properties
Property Type Description
id
string

Tremendous ID of the reward

order_id
string

Tremendous ID of the order this reward is part of.

created_at
string date-time

Date the reward was created

campaign_id
string

ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.

products
array string

List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.

Providing a products array will override the products made available by the campaign specified using the campaign_id property unless the products array is empty. It will not override other campaign attributes, like the message and customization of the look and feel.

value
object
Show object properties
Property Type Description
denomination
number double

Amount of the reward

currency_code
string

Currency of the reward

recipient
object

Details of the recipient of the reward

Show object properties
Property Type Description
name
string

Name of the recipient

email
string

Email address of the recipient

phone
string

Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).

deliver_at
string date

Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.

custom_fields
array
Show array item type
Property Type Description
id
string

Tremendous ID of the custom field

value
string

Value of the custom field

label
string

Label of the custom field

language
string

Set this to translate the redemption experience for this reward. Pass a 2-letter ISO-639-1 code for the desired language. Defaults to en.

delivery
object

Details on how the reward is delivered to the recipient.

Show object properties
Property Type Description
method
string

How to deliver the reward to the recipient.

Delivery Method Description
EMAIL Deliver the reward to the recipient by email
LINK

Deliver the reward to the recipient via a link.

The link can be retrieved on a successfully ordered reward via the /rewards or /rewards/{id} endpoint. That link must then be delivered to the recipient out-of-band.

PHONE Deliver the reward to the recipient by SMS
### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body. - * @summary Create order - * @param {CreateOrderRequest} createOrderRequest Order to create - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - createOrder(createOrderRequest, options) { - return (0, exports.OrdersApiFp)(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve the order, identified by the given `id` in the URL - * @summary Retrieve order - * @param {string} id ID of the order that should be retrieved. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - getOrder(id, options) { - return (0, exports.OrdersApiFp)(this.configuration).getOrder(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a list of orders - * @summary List orders - * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC). - * @param {string} [campaignId] Only return results with a matching campaign_id. - * @param {string} [externalId] Only return results with a matching external_id. - * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime. - * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) { - return (0, exports.OrdersApiFp)(this.configuration).listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard. - * @summary Reject order - * @param {string} id ID of the order that should be rejected. In case the order has an `external_id` reference supplied by the customer on creation, it\'s possible to use it instead. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrdersApi - */ - rejectOrder(id, options) { - return (0, exports.OrdersApiFp)(this.configuration).rejectOrder(id, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.OrdersApi = OrdersApi; -/** - * OrganizationsApi - axios parameter creator - * @export - */ -const OrganizationsApiAxiosParamCreator = function (configuration) { - return { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/organizations/create_api_key`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization: (createOrganizationRequest_1, ...args_1) => __awaiter(this, [createOrganizationRequest_1, ...args_1], void 0, function* (createOrganizationRequest, options = {}) { - // verify required parameter 'createOrganizationRequest' is not null or undefined - (0, common_1.assertParamExists)('createOrganization', 'createOrganizationRequest', createOrganizationRequest); - const localVarPath = `/organizations`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrganizationRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getOrganization', 'id', id); - const localVarPath = `/organizations/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/organizations`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.OrganizationsApiAxiosParamCreator = OrganizationsApiAxiosParamCreator; -/** - * OrganizationsApi - functional programming interface - * @export - */ -const OrganizationsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.OrganizationsApiAxiosParamCreator)(configuration); - return { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createApiKey(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createApiKey']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization(createOrganizationRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrganization(createOrganizationRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrganization(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.getOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrganizations(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.listOrganizations']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.OrganizationsApiFp = OrganizationsApiFp; -/** - * OrganizationsApi - factory interface - * @export - */ -const OrganizationsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.OrganizationsApiFp)(configuration); - return { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createApiKey(options) { - return localVarFp.createApiKey(options).then((request) => request(axios, basePath)); - }, - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createOrganization(createOrganizationRequest, options) { - return localVarFp.createOrganization(createOrganizationRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getOrganization(id, options) { - return localVarFp.getOrganization(id, options).then((request) => request(axios, basePath)); - }, - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrganizations(options) { - return localVarFp.listOrganizations(options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.OrganizationsApiFactory = OrganizationsApiFactory; -/** - * OrganizationsApi - object-oriented interface - * @export - * @class OrganizationsApi - * @extends {BaseAPI} - */ -class OrganizationsApi extends base_1.BaseAPI { - /** - * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.** - * @summary Create API key - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - createApiKey(options) { - return (0, exports.OrganizationsApiFp)(this.configuration).createApiKey(options).then((request) => request(this.axios, this.basePath)); - } - /** - * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard. - * @summary Create organization - * @param {CreateOrganizationRequest} createOrganizationRequest Organization details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - createOrganization(createOrganizationRequest, options) { - return (0, exports.OrganizationsApiFp)(this.configuration).createOrganization(createOrganizationRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * - * @summary Retrieve organization - * @param {string} id ID of the organization to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - getOrganization(id, options) { - return (0, exports.OrganizationsApiFp)(this.configuration).getOrganization(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * The returned list only includes the organization to which the API key belongs to, that is used for the request. - * @summary List organizations - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof OrganizationsApi - */ - listOrganizations(options) { - return (0, exports.OrganizationsApiFp)(this.configuration).listOrganizations(options).then((request) => request(this.axios, this.basePath)); - } -} -exports.OrganizationsApi = OrganizationsApi; -/** - * ProductsApi - axios parameter creator - * @export - */ -const ProductsApiAxiosParamCreator = function (configuration) { - return { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getProduct', 'id', id); - const localVarPath = `/products/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts: (country_1, currency_1, ...args_1) => __awaiter(this, [country_1, currency_1, ...args_1], void 0, function* (country, currency, options = {}) { - const localVarPath = `/products`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (country !== undefined) { - localVarQueryParameter['country'] = country; - } - if (currency !== undefined) { - localVarQueryParameter['currency'] = currency; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator; -/** - * ProductsApi - functional programming interface - * @export - */ -const ProductsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration); - return { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getProduct(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.getProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts(country, currency, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(country, currency, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.listProducts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.ProductsApiFp = ProductsApiFp; -/** - * ProductsApi - factory interface - * @export - */ -const ProductsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.ProductsApiFp)(configuration); - return { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProduct(id, options) { - return localVarFp.getProduct(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listProducts(country, currency, options) { - return localVarFp.listProducts(country, currency, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.ProductsApiFactory = ProductsApiFactory; -/** - * ProductsApi - object-oriented interface - * @export - * @class ProductsApi - * @extends {BaseAPI} - */ -class ProductsApi extends base_1.BaseAPI { - /** - * Retrieve a product, identified by the given `id` in the URL - * @summary Retrieve product - * @param {string} id ID of the product that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProductsApi - */ - getProduct(id, options) { - return (0, exports.ProductsApiFp)(this.configuration).getProduct(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a list of available products - * @summary List products - * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries - * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProductsApi - */ - listProducts(country, currency, options) { - return (0, exports.ProductsApiFp)(this.configuration).listProducts(country, currency, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.ProductsApi = ProductsApi; -/** - * RewardsApi - axios parameter creator - * @export - */ -const RewardsApiAxiosParamCreator = function (configuration) { - return { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('generateRewardLink', 'id', id); - const localVarPath = `/rewards/{id}/generate_link` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('generateRewardToken', 'id', id); - const localVarPath = `/rewards/{id}/generate_embed_token` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getReward', 'id', id); - const localVarPath = `/rewards/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards: (offset_1, ...args_1) => __awaiter(this, [offset_1, ...args_1], void 0, function* (offset, options = {}) { - const localVarPath = `/rewards`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('resendReward', 'id', id); - const localVarPath = `/rewards/{id}/resend` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.RewardsApiAxiosParamCreator = RewardsApiAxiosParamCreator; -/** - * RewardsApi - functional programming interface - * @export - */ -const RewardsApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.RewardsApiAxiosParamCreator)(configuration); - return { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardLink(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardLink']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardToken(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getReward(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards(offset, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listRewards(offset, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.listRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.resendReward(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.resendReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.RewardsApiFp = RewardsApiFp; -/** - * RewardsApi - factory interface - * @export - */ -const RewardsApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.RewardsApiFp)(configuration); - return { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardLink(id, options) { - return localVarFp.generateRewardLink(id, options).then((request) => request(axios, basePath)); - }, - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - generateRewardToken(id, options) { - return localVarFp.generateRewardToken(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getReward(id, options) { - return localVarFp.getReward(id, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRewards(offset, options) { - return localVarFp.listRewards(offset, options).then((request) => request(axios, basePath)); - }, - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - resendReward(id, options) { - return localVarFp.resendReward(id, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.RewardsApiFactory = RewardsApiFactory; -/** - * RewardsApi - object-oriented interface - * @export - * @class RewardsApi - * @extends {BaseAPI} - */ -class RewardsApi extends base_1.BaseAPI { - /** - * Generate a redemption link for the reward identified by the `id` in the URL - * @summary Generate a reward URL - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - generateRewardLink(id, options) { - return (0, exports.RewardsApiFp)(this.configuration).generateRewardLink(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours. - * @summary Generate a reward token - * @param {string} id ID of the reward - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - generateRewardToken(id, options) { - return (0, exports.RewardsApiFp)(this.configuration).generateRewardToken(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve the reward, identified by the given `id` in the URL - * @summary Retrieve single reward - * @param {string} id ID of the reward that should be retrieved - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - getReward(id, options) { - return (0, exports.RewardsApiFp)(this.configuration).getReward(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Retrieve a list of all created rewards - * @summary List rewards - * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC). - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - listRewards(offset, options) { - return (0, exports.RewardsApiFp)(this.configuration).listRewards(offset, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Resends a reward, identified by the given `id` in the URL, to its recipient. - * @summary Resend reward - * @param {string} id ID of the reward that should be resent - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RewardsApi - */ - resendReward(id, options) { - return (0, exports.RewardsApiFp)(this.configuration).resendReward(id, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.RewardsApi = RewardsApi; -/** - * RolesApi - axios parameter creator - * @export - */ -const RolesApiAxiosParamCreator = function (configuration) { - return { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/roles`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.RolesApiAxiosParamCreator = RolesApiAxiosParamCreator; -/** - * RolesApi - functional programming interface - * @export - */ -const RolesApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.RolesApiAxiosParamCreator)(configuration); - return { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listRoles(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RolesApi.listRoles']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.RolesApiFp = RolesApiFp; -/** - * RolesApi - factory interface - * @export - */ -const RolesApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.RolesApiFp)(configuration); - return { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listRoles(options) { - return localVarFp.listRoles(options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.RolesApiFactory = RolesApiFactory; -/** - * RolesApi - object-oriented interface - * @export - * @class RolesApi - * @extends {BaseAPI} - */ -class RolesApi extends base_1.BaseAPI { - /** - * List all available roles in the organization. - * @summary List roles - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof RolesApi - */ - listRoles(options) { - return (0, exports.RolesApiFp)(this.configuration).listRoles(options).then((request) => request(this.axios, this.basePath)); - } -} -exports.RolesApi = RolesApi; -/** - * WebhooksApi - axios parameter creator - * @export - */ -const WebhooksApiAxiosParamCreator = function (configuration) { - return { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook: (createWebhookRequest_1, ...args_1) => __awaiter(this, [createWebhookRequest_1, ...args_1], void 0, function* (createWebhookRequest, options = {}) { - // verify required parameter 'createWebhookRequest' is not null or undefined - (0, common_1.assertParamExists)('createWebhook', 'createWebhookRequest', createWebhookRequest); - const localVarPath = `/webhooks`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWebhookRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('deleteWebhook', 'id', id); - const localVarPath = `/webhooks/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('getWebhook', 'id', id); - const localVarPath = `/webhooks/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('listWebhookEvents', 'id', id); - const localVarPath = `/webhooks/{id}/events` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) { - const localVarPath = `/webhooks`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook: (id_1, simulateWebhookRequest_1, ...args_1) => __awaiter(this, [id_1, simulateWebhookRequest_1, ...args_1], void 0, function* (id, simulateWebhookRequest, options = {}) { - // verify required parameter 'id' is not null or undefined - (0, common_1.assertParamExists)('simulateWebhook', 'id', id); - // verify required parameter 'simulateWebhookRequest' is not null or undefined - (0, common_1.assertParamExists)('simulateWebhook', 'simulateWebhookRequest', simulateWebhookRequest); - const localVarPath = `/webhooks/{id}/simulate` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); - const localVarHeaderParameter = {}; - const localVarQueryParameter = {}; - // authentication BearerApiKey required - // http bearer authentication required - yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration); - localVarHeaderParameter['Content-Type'] = 'application/json'; - (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); - localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(simulateWebhookRequest, localVarRequestOptions, configuration); - return { - url: (0, common_1.toPathString)(localVarUrlObj), - options: localVarRequestOptions, - }; - }), - }; -}; -exports.WebhooksApiAxiosParamCreator = WebhooksApiAxiosParamCreator; -/** - * WebhooksApi - functional programming interface - * @export - */ -const WebhooksApiFp = function (configuration) { - const localVarAxiosParamCreator = (0, exports.WebhooksApiAxiosParamCreator)(configuration); - return { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook(createWebhookRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.createWebhook(createWebhookRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.createWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteWebhook(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.deleteWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebhook(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.getWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents(id, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhookEvents(id, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhookEvents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks(options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhooks(options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhooks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook(id, simulateWebhookRequest, options) { - return __awaiter(this, void 0, void 0, function* () { - var _a, _b, _c; - const localVarAxiosArgs = yield localVarAxiosParamCreator.simulateWebhook(id, simulateWebhookRequest, options); - const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; - const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.simulateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url; - return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }); - }, - }; -}; -exports.WebhooksApiFp = WebhooksApiFp; -/** - * WebhooksApi - factory interface - * @export - */ -const WebhooksApiFactory = function (configuration, basePath, axios) { - const localVarFp = (0, exports.WebhooksApiFp)(configuration); - return { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - createWebhook(createWebhookRequest, options) { - return localVarFp.createWebhook(createWebhookRequest, options).then((request) => request(axios, basePath)); - }, - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteWebhook(id, options) { - return localVarFp.deleteWebhook(id, options).then((request) => request(axios, basePath)); - }, - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWebhook(id, options) { - return localVarFp.getWebhook(id, options).then((request) => request(axios, basePath)); - }, - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhookEvents(id, options) { - return localVarFp.listWebhookEvents(id, options).then((request) => request(axios, basePath)); - }, - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listWebhooks(options) { - return localVarFp.listWebhooks(options).then((request) => request(axios, basePath)); - }, - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - simulateWebhook(id, simulateWebhookRequest, options) { - return localVarFp.simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; -exports.WebhooksApiFactory = WebhooksApiFactory; -/** - * WebhooksApi - object-oriented interface - * @export - * @class WebhooksApi - * @extends {BaseAPI} - */ -class WebhooksApi extends base_1.BaseAPI { - /** - * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body
Property Type Description
url
string uri

URL the webhook will make requests to

- * @summary Create webhook - * @param {CreateWebhookRequest} createWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - createWebhook(createWebhookRequest, options) { - return (0, exports.WebhooksApiFp)(this.configuration).createWebhook(createWebhookRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Delete webhook - * @param {string} id ID of the webhook to delete - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - deleteWebhook(id, options) { - return (0, exports.WebhooksApiFp)(this.configuration).deleteWebhook(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Retrieve webhook - * @param {string} id ID of the webhook to retrieve - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - getWebhook(id, options) { - return (0, exports.WebhooksApiFp)(this.configuration).getWebhook(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List events - * @param {string} id ID of the webhook to list the events for - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - listWebhookEvents(id, options) { - return (0, exports.WebhooksApiFp)(this.configuration).listWebhookEvents(id, options).then((request) => request(this.axios, this.basePath)); - } - /** - * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary List webhooks - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - listWebhooks(options) { - return (0, exports.WebhooksApiFp)(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath)); - } - /** - * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) - * @summary Test webhook - * @param {string} id ID of the webhook to test - * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof WebhooksApi - */ - simulateWebhook(id, simulateWebhookRequest, options) { - return (0, exports.WebhooksApiFp)(this.configuration).simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(this.axios, this.basePath)); - } -} -exports.WebhooksApi = WebhooksApi; diff --git a/dist/base.d.ts b/dist/base.d.ts deleted file mode 100644 index dfe687d..0000000 --- a/dist/base.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import type { Configuration } from './configuration'; -import type { AxiosInstance, RawAxiosRequestConfig } from 'axios'; -export declare const BASE_PATH: string; -/** - * - * @export - */ -export declare const COLLECTION_FORMATS: { - csv: string; - ssv: string; - tsv: string; - pipes: string; -}; -/** - * - * @export - * @interface RequestArgs - */ -export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; -} -/** - * - * @export - * @class BaseAPI - */ -export declare class BaseAPI { - protected basePath: string; - protected axios: AxiosInstance; - protected configuration: Configuration | undefined; - constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance); -} -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -export declare class RequiredError extends Error { - field: string; - constructor(field: string, msg?: string); -} -interface ServerMap { - [key: string]: { - url: string; - description: string; - }[]; -} -/** - * - * @export - */ -export declare const operationServerMap: ServerMap; -export {}; diff --git a/dist/base.js b/dist/base.js deleted file mode 100644 index eb63e77..0000000 --- a/dist/base.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -/* tslint:disable */ -/* eslint-disable */ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; -const axios_1 = require("axios"); -exports.BASE_PATH = "https://testflight.tremendous.com/api/v2".replace(/\/+$/, ""); -/** - * - * @export - */ -exports.COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; -/** - * - * @export - * @class BaseAPI - */ -class BaseAPI { - constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) { - var _a; - this.basePath = basePath; - this.axios = axios; - if (configuration) { - this.configuration = configuration; - this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath; - } - } -} -exports.BaseAPI = BaseAPI; -; -/** - * - * @export - * @class RequiredError - * @extends {Error} - */ -class RequiredError extends Error { - constructor(field, msg) { - super(msg); - this.field = field; - this.name = "RequiredError"; - } -} -exports.RequiredError = RequiredError; -/** - * - * @export - */ -exports.operationServerMap = {}; diff --git a/dist/common.d.ts b/dist/common.d.ts deleted file mode 100644 index e7d7ce5..0000000 --- a/dist/common.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -/** - * - * @export - */ -export declare const DUMMY_BASE_URL = "https://example.com"; -/** - * - * @throws {RequiredError} - * @export - */ -export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void; -/** - * - * @export - */ -export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise; -/** - * - * @export - */ -export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void; -/** - * - * @export - */ -export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise; -/** - * - * @export - */ -export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise; -/** - * - * @export - */ -export declare const setSearchParams: (url: URL, ...objects: any[]) => void; -/** - * - * @export - */ -export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any; -/** - * - * @export - */ -export declare const toPathString: (url: URL) => string; -/** - * - * @export - */ -export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => >(axios?: AxiosInstance, basePath?: string) => Promise; diff --git a/dist/common.js b/dist/common.js deleted file mode 100644 index aa297d3..0000000 --- a/dist/common.js +++ /dev/null @@ -1,161 +0,0 @@ -"use strict"; -/* tslint:disable */ -/* eslint-disable */ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0; -const base_1 = require("./base"); -/** - * - * @export - */ -exports.DUMMY_BASE_URL = 'https://example.com'; -/** - * - * @throws {RequiredError} - * @export - */ -const assertParamExists = function (functionName, paramName, paramValue) { - if (paramValue === null || paramValue === undefined) { - throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } -}; -exports.assertParamExists = assertParamExists; -/** - * - * @export - */ -const setApiKeyToObject = function (object, keyParamName, configuration) { - return __awaiter(this, void 0, void 0, function* () { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? yield configuration.apiKey(keyParamName) - : yield configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } - }); -}; -exports.setApiKeyToObject = setApiKeyToObject; -/** - * - * @export - */ -const setBasicAuthToObject = function (object, configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; - } -}; -exports.setBasicAuthToObject = setBasicAuthToObject; -/** - * - * @export - */ -const setBearerAuthToObject = function (object, configuration) { - return __awaiter(this, void 0, void 0, function* () { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? yield configuration.accessToken() - : yield configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } - }); -}; -exports.setBearerAuthToObject = setBearerAuthToObject; -/** - * - * @export - */ -const setOAuthToObject = function (object, name, scopes, configuration) { - return __awaiter(this, void 0, void 0, function* () { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? yield configuration.accessToken(name, scopes) - : yield configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } - }); -}; -exports.setOAuthToObject = setOAuthToObject; -function setFlattenedQueryParams(urlSearchParams, parameter, key = "") { - if (parameter == null) - return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } - } -} -/** - * - * @export - */ -const setSearchParams = function (url, ...objects) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); -}; -exports.setSearchParams = setSearchParams; -/** - * - * @export - */ -const serializeDataIfNeeded = function (value, requestOptions, configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); -}; -exports.serializeDataIfNeeded = serializeDataIfNeeded; -/** - * - * @export - */ -const toPathString = function (url) { - return url.pathname + url.search + url.hash; -}; -exports.toPathString = toPathString; -/** - * - * @export - */ -const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) { - return (axios = globalAxios, basePath = BASE_PATH) => { - var _a; - const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url }); - return axios.request(axiosRequestArgs); - }; -}; -exports.createRequestFunction = createRequestFunction; diff --git a/dist/configuration.d.ts b/dist/configuration.d.ts deleted file mode 100644 index fc4a2a7..0000000 --- a/dist/configuration.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * 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; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; -} -export declare 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; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; - constructor(param?: ConfigurationParameters); - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - isJsonMime(mime: string): boolean; -} diff --git a/dist/configuration.js b/dist/configuration.js deleted file mode 100644 index adad732..0000000 --- a/dist/configuration.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -/* tslint:disable */ -/* eslint-disable */ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Configuration = void 0; -// Edited by Tremendous, lines 6-7, 85-86: Add custom User Agent with lib's version. -const { version } = require("../package.json"); -const DefaultUserAgent = `Tremendous Node v${version}`; -class Configuration { - constructor(param = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions || {}; - this.baseOptions.headers = { "User-Agent": DefaultUserAgent }; - this.formDataCtor = param.formDataCtor; - } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - isJsonMime(mime) { - const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } -} -exports.Configuration = Configuration; diff --git a/dist/environments.d.ts b/dist/environments.d.ts deleted file mode 100644 index 4d980b4..0000000 --- a/dist/environments.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const Environments: { - production: string; - testflight: string; -}; diff --git a/dist/environments.js b/dist/environments.js deleted file mode 100644 index fd18e95..0000000 --- a/dist/environments.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Environments = void 0; -exports.Environments = { - production: 'https://api.tremendous.com/api/v2', - testflight: 'https://testflight.tremendous.com/api/v2', -}; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index dff0b9e..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -export * from "./api"; -export * from "./configuration"; -export * from "./environments"; diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index b3ba8be..0000000 --- a/dist/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -/* tslint:disable */ -/* eslint-disable */ -/** - * API Endpoints - * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API. - * - * The version of the OpenAPI document: 2 - * Contact: developers@tremendous.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./api"), exports); -__exportStar(require("./configuration"), exports); -__exportStar(require("./environments"), exports);