From 93824a032583f62e9a7c99ab5ee86860095201d1 Mon Sep 17 00:00:00 2001 From: Lucas Mazza Date: Mon, 4 Mar 2024 11:53:32 -0300 Subject: [PATCH] import new repo --- .github/CODEOWNERS | 1 + .github/dependabot.yml | 11 + .github/workflows/publish.yml | 19 + .github/workflows/test.yml | 28 + .gitignore | 2 + .npmignore | 8 + .openapi-generator-ignore | 30 + .openapi-generator/FILES | 7 + .openapi-generator/VERSION | 1 + CONTRIBUTING.md | 16 + LICENSE | 21 + README.md | 74 + RELEASING.md | 23 + api.ts | 7696 +++++++++++++++++ base.ts | 86 + bin/generate | 21 + common.ts | 150 + configuration.ts | 115 + dist/api.d.ts | 5920 +++++++++++++ dist/api.js | 3888 +++++++++ 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 | 5 + dist/environments.js | 7 + dist/index.d.ts | 14 + dist/index.js | 32 + environments.ts | 8 + index.ts | 19 + package-lock.json | 2597 ++++++ package.json | 46 + .../typescript-axios/configuration.mustache | 104 + templates/typescript-axios/index.mustache | 8 + test/campaigns.test.ts | 32 + test/invoices.test.ts | 22 + test/members.test.ts | 22 + test/orders.test.ts | 63 + test/products.test.ts | 31 + tsconfig.json | 19 + 42 files changed, 21641 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 RELEASING.md create mode 100644 api.ts create mode 100644 base.ts create mode 100755 bin/generate create mode 100644 common.ts create mode 100644 configuration.ts create mode 100644 dist/api.d.ts create mode 100644 dist/api.js create mode 100644 dist/base.d.ts create mode 100644 dist/base.js create mode 100644 dist/common.d.ts create mode 100644 dist/common.js create mode 100644 dist/configuration.d.ts create mode 100644 dist/configuration.js create mode 100644 dist/environments.d.ts create mode 100644 dist/environments.js create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 environments.ts create mode 100644 index.ts create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 templates/typescript-axios/configuration.mustache create mode 100644 templates/typescript-axios/index.mustache create mode 100644 test/campaigns.test.ts create mode 100644 test/invoices.test.ts create mode 100644 test/members.test.ts create mode 100644 test/orders.test.ts create mode 100644 test/products.test.ts create mode 100644 tsconfig.json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..1a1f4c5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +.github/workflows @tremendous-rewards/platform diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c219e9b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..d7e467e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,19 @@ +name: Publish package to NPM +on: + release: + types: [published] +jobs: + publish: + if: github.repository == 'tremendous/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 + # TODO: Remove `--dry-run` when it's ready + - run: npm publish --dry-run + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..289b85a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Run tests + +on: [push, pull_request] + +jobs: + test: + if: github.repository == 'tremendous/tremendous-node' + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ['18.x', '20.x', '21.x'] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npm run test + env: + SANDBOX_API_TOKEN: ${{ secrets.SANDBOX_API_TOKEN }} + TEST_CAMPAIGN_ID: ${{ secrets.TEST_CAMPAIGN_ID }} + TEST_PRODUCT_ID: ${{ secrets.TEST_PRODUCT_ID }} + TEST_RECIPIENT_EMAIL: ${{ secrets.TEST_RECIPIENT_EMAIL }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c0aa04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/npm-debug.log diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..9c4845f --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +/test/ +/.gitignore +/RELEASING.md +/.github +/tsconfig.json +/tmp +/templates +.openapi-generator* diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..972b410 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,30 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md +bin +.gitignore +.npmignore +README.md +package.json +package-lock.json +tsconfig.json diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..04b8aae --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,7 @@ +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts +tsconfig.esm.json diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..fff4bdd --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..943e367 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,16 @@ +# Contributing + + +This library cannot directly accept PRs from the public as it is generated from the OpenAPI specification + for the Tremendous API. + +If you find an issue, please investigate whether it is a type problem with [our API reference][1] or a problem with the [typescript-axios][2] generator. Then open an issue and we will investigate further. + +## Running Tests + +This library tests uses our [Sandbox environment][3], and depend on an API token and IDs for some seed +resources. They are executed via GitHub actions and don't need to be executed locally by contributors. + +[1]: https://developers.tremendous.com/reference +[2]: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/typescript-axios.md +[3]: https://developers.tremendous.com/docs/sandbox-environment diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..15dc48c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Tremendous, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f233398 --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +A node.js client library for the [Tremendous API][1]. + +## Installation + +```console +$ npm install tremendous +``` + +## Getting started + +All API requests require an access token. A sandbox access token is assigned upon signup through the [Tremendous Sandbox Environment][2]. Once you are ready to move to production, you will be assigned a production access token. + +### Authentication +## Getting started + +All endpoints require a valid `access_token` for authentication. Attach them via the configuration. + +```typescript +import { Configuration, Environments } from "tremendous"; + +const configuration = new Configuration({ + basePath: Environments.testflight, + accessToken: "YOUR-TESTFLIGHT-TOKEN", +}); +``` + +## Examples + +Submitting an order: + +```typescript +import { OrdersApi, CreateOrderRequest } from "tremendous"; + +const orders = new OrdersApi(configuration); +const params: CreateOrderRequest = { + payment: { + funding_source_id: "[FUNDING SOURCE ID HERE]", + }, + reward: + { + delivery: { + method: "EMAIL" + }, + recipient: { + name: "Recipient Name", + email: "recipient@domain" + }, + value: { + denomination: 5.0, + currency_code: "USD", + }, + campaign_id: "[CAMPAIGN_ID]", + } +}; + +const response = await orders.createOrder(params); +console.log(`Order created! ID: ${response.order.id}`); +``` + +Listing products: + +```typescript +import { ProductsApi } from "tremendous"; + +const client = new ProductsApi(configuration); + +const response = await client.listProducts(); + +response.data.products.forEach(product => { /* */ }); +``` + +[1]: https://tremendous.com/docs +[2]: https://testflight.tremendous.com/rewards +[3]: https://tremendous.com/docs diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..129c65e --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,23 @@ +## Step 1 - How to re-generate the SDK + +The source code from this repo is generated using [OpenAPI generator][1] and the Open API specification for the Tremendous API, available to Tremendous engineers. + +```console +# generate a fresh Open API spec file +cd core && bin/openapi-bundle + +# generate new `.ts` files and compile them into `./dist` +cd tremendous-node-spike && bin/generate [PATH TO YML] && npm run build +``` + +## Step 2 - Update the version on `package.json` + +Bump the version on `package.json` manually following [Semantic Versioning][2] practices - most changes here should be backwards compatible and deserve a MINOR version update + +## Step 3 - Publish a new release on GitHub + +The [publish.yml](.github/workflows/publish.yml) workflow is responsible for publishing the package to NPM when a new release is published on GitHub. + + +[1]: https://openapi-generator.tech +[2]: https://semver.org diff --git a/api.ts b/api.ts new file mode 100644 index 0000000..028def3 --- /dev/null +++ b/api.ts @@ -0,0 +1,7696 @@ +/* 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. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +/** + * 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; +} +/** + * 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. > Note: Campaigns must be created from the Tremendous dashboard. > > • [Production Dashboard](https://app.tremendous.com) > • [Sandbox Dashboard](https://app.testflight.tremendous.com/) + * @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; +} +/** + * + * @export + * @interface CreateApiKey200Response + */ +export interface CreateApiKey200Response { + /** + * The new API key + * @type {string} + * @memberof CreateApiKey200Response + */ + 'api_key'?: string; +} +/** + * + * @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; + /** + * Full name of the member + * @type {string} + * @memberof CreateMember + */ + 'name': string; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
+ * @type {string} + * @memberof CreateMember + */ + 'role': CreateMemberRoleEnum; +} + +export const CreateMemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN' +} as const; + +export type CreateMemberRoleEnum = typeof CreateMemberRoleEnum[keyof typeof CreateMemberRoleEnum]; + +/** + * + * @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; + /** + * Full name of the member + * @type {string} + * @memberof CreateMemberRequest + */ + 'name': string; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
+ * @type {string} + * @memberof CreateMemberRequest + */ + 'role': CreateMemberRequestRoleEnum; +} + +export const CreateMemberRequestRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN' +} as const; + +export type CreateMemberRequestRoleEnum = typeof CreateMemberRequestRoleEnum[keyof typeof CreateMemberRequestRoleEnum]; + +/** + * + * @export + * @interface CreateOrder200Response + */ +export interface CreateOrder200Response { + /** + * + * @type {CreateOrder200ResponseOrder} + * @memberof CreateOrder200Response + */ + 'order': CreateOrder200ResponseOrder; +} +/** + * An order wraps around the fulfilment of one or more rewards. + * @export + * @interface CreateOrder200ResponseOrder + */ +export interface CreateOrder200ResponseOrder { + /** + * Tremendous ID of the order + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + '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 CreateOrder200ResponseOrder + */ + '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 CreateOrder200ResponseOrder + */ + 'campaign_id'?: string | null; + /** + * Date the order has been created + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + '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.
+ * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + 'status': CreateOrder200ResponseOrderStatusEnum; + /** + * + * @type {ListOrders200ResponseOrdersInnerPayment} + * @memberof CreateOrder200ResponseOrder + */ + 'payment'?: ListOrders200ResponseOrdersInnerPayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + 'invoice_id'?: string; + /** + * + * @type {Array} + * @memberof CreateOrder200ResponseOrder + */ + 'rewards'?: Array; +} + +export const CreateOrder200ResponseOrderStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type CreateOrder200ResponseOrderStatusEnum = typeof CreateOrder200ResponseOrderStatusEnum[keyof typeof CreateOrder200ResponseOrderStatusEnum]; + +/** + * 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 CreateOrder200ResponseOrderRewardsInner + */ +export interface CreateOrder200ResponseOrderRewardsInner { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'created_at'?: string; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + '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 CreateOrder200ResponseOrderRewardsInner + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'custom_fields'?: Array; + /** + * + * @type {CreateOrder200ResponseOrderRewardsInnerDelivery} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'delivery'?: CreateOrder200ResponseOrderRewardsInnerDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface CreateOrder200ResponseOrderRewardsInnerDelivery + */ +export interface CreateOrder200ResponseOrderRewardsInnerDelivery { + /** + * 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 CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'method': CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum; + /** + * 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 CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'status': CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'link'?: string; +} + +export const CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = typeof CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum[keyof typeof CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum]; +export const CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +export type CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum[keyof typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum]; + +/** + * + * @export + * @interface CreateOrder201Response + */ +export interface CreateOrder201Response { + /** + * + * @type {ListOrders200ResponseOrdersInner} + * @memberof CreateOrder201Response + */ + 'order': ListOrders200ResponseOrdersInner; +} +/** + * + * @export + * @interface CreateOrderRequest + */ +export interface CreateOrderRequest { + /** + * 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 CreateOrderRequest + */ + 'external_id'?: string | null; + /** + * + * @type {CreateOrderRequestPayment} + * @memberof CreateOrderRequest + */ + 'payment': CreateOrderRequestPayment; + /** + * + * @type {CreateOrderRequestReward} + * @memberof CreateOrderRequest + */ + 'reward': CreateOrderRequestReward; +} +/** + * + * @export + * @interface CreateOrderRequestPayment + */ +export interface CreateOrderRequestPayment { + /** + * 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 CreateOrderRequestPayment + */ + '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 CreateOrderRequestReward + */ +export interface CreateOrderRequestReward { + /** + * 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 CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof CreateOrderRequestReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'language'?: string; + /** + * + * @type {CreateOrderRequestRewardDelivery} + * @memberof CreateOrderRequestReward + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface CreateOrderRequestRewardDelivery + */ +export interface CreateOrderRequestRewardDelivery { + /** + * 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 CreateOrderRequestRewardDelivery + */ + 'method'?: CreateOrderRequestRewardDeliveryMethodEnum; +} + +export const CreateOrderRequestRewardDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type CreateOrderRequestRewardDeliveryMethodEnum = typeof CreateOrderRequestRewardDeliveryMethodEnum[keyof typeof CreateOrderRequestRewardDeliveryMethodEnum]; + +/** + * + * @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 const CreateOrganization200ResponseOrganizationStatusEnum = { + Pending: 'PENDING', + Approved: 'APPROVED', + Rejected: 'REJECTED' +} as const; + +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 from the current organization to the new organization. Defaults to `false`. + * @type {boolean} + * @memberof CreateOrganizationRequestCopySettings + */ + 'users'?: boolean; +} +/** + * + * @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 const 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' +} as const; + +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; +} +/** + * 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 const DeliveryDetailsMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type DeliveryDetailsMethodEnum = typeof DeliveryDetailsMethodEnum[keyof typeof DeliveryDetailsMethodEnum]; +export const DeliveryDetailsStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +export type DeliveryDetailsStatusEnum = typeof DeliveryDetailsStatusEnum[keyof typeof DeliveryDetailsStatusEnum]; + +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface DeliveryDetailsWithLink + */ +export interface DeliveryDetailsWithLink { + /** + * 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 DeliveryDetailsWithLink + */ + 'method': DeliveryDetailsWithLinkMethodEnum; + /** + * 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 DeliveryDetailsWithLink + */ + 'status': DeliveryDetailsWithLinkStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof DeliveryDetailsWithLink + */ + 'link'?: string; +} + +export const DeliveryDetailsWithLinkMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type DeliveryDetailsWithLinkMethodEnum = typeof DeliveryDetailsWithLinkMethodEnum[keyof typeof DeliveryDetailsWithLinkMethodEnum]; +export const DeliveryDetailsWithLinkStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +export type DeliveryDetailsWithLinkStatusEnum = typeof DeliveryDetailsWithLinkStatusEnum[keyof typeof DeliveryDetailsWithLinkStatusEnum]; + +/** + * 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 const DeliveryMethod = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +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 const DeliveryStatus = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +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 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 const FundingSourceMethodEnum = { + Balance: 'balance', + BankAccount: 'bank_account', + CreditCard: 'credit_card', + Invoice: 'invoice' +} as const; + +export type FundingSourceMethodEnum = typeof FundingSourceMethodEnum[keyof typeof FundingSourceMethodEnum]; +export const FundingSourceTypeEnum = { + Commercial: 'COMMERCIAL', + ProForma: 'PRO_FORMA', + PrefundingOnly: 'PREFUNDING_ONLY' +} as const; + +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 GetCampaign200Response + */ +export interface GetCampaign200Response { + /** + * + * @type {ListCampaigns200ResponseCampaignsInner} + * @memberof GetCampaign200Response + */ + 'campaign': ListCampaigns200ResponseCampaignsInner; +} +/** + * + * @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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof GetMember200ResponseMember + */ + 'role': GetMember200ResponseMemberRoleEnum; + /** + * 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 const GetMember200ResponseMemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type GetMember200ResponseMemberRoleEnum = typeof GetMember200ResponseMemberRoleEnum[keyof typeof GetMember200ResponseMemberRoleEnum]; +export const GetMember200ResponseMemberStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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 const GetMember200ResponseMemberEventsInnerTypeEnum = { + Created: 'created', + LastLogin: 'last_login' +} as const; + +export type GetMember200ResponseMemberEventsInnerTypeEnum = typeof GetMember200ResponseMemberEventsInnerTypeEnum[keyof typeof GetMember200ResponseMemberEventsInnerTypeEnum]; + +/** + * + * @export + * @interface GetOrganization200Response + */ +export interface GetOrganization200Response { + /** + * + * @type {ListOrganizations200ResponseOrganizationsInner} + * @memberof GetOrganization200Response + */ + 'organization'?: ListOrganizations200ResponseOrganizationsInner; +} +/** + * + * @export + * @interface GetProduct200Response + */ +export interface GetProduct200Response { + /** + * + * @type {ListProducts200ResponseProductsInner} + * @memberof GetProduct200Response + */ + 'product': ListProducts200ResponseProductsInner; +} +/** + * + * @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 const InvoiceStatusEnum = { + Deleted: 'DELETED', + Paid: 'PAID', + Open: 'OPEN', + MarkedAsPaid: 'MARKED_AS_PAID' +} as const; + +export type InvoiceStatusEnum = typeof InvoiceStatusEnum[keyof typeof InvoiceStatusEnum]; + +/** + * + * @export + * @interface ListBalanceTransactions200Response + */ +export interface ListBalanceTransactions200Response { + /** + * + * @type {Array} + * @memberof ListBalanceTransactions200Response + */ + 'invoices'?: Array; +} +/** + * A balance transaction represents a specific movement or change in an account\'s balance. + * @export + * @interface ListBalanceTransactions200ResponseInvoicesInner + */ +export interface ListBalanceTransactions200ResponseInvoicesInner { + /** + * Date that the transaction was created + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'created_at'?: string; + /** + * Amount of the transaction in USD + * @type {number} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'amount'?: number; + /** + * The updated total after the transaction. Note that this running balance may be delayed and contain `null`. + * @type {number} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'balance'?: number; + /** + * The action that was performed + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'action'?: string; + /** + * A brief description of the transaction + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + '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. > Note: Campaigns must be created from the Tremendous dashboard. > > • [Production Dashboard](https://app.tremendous.com) > • [Sandbox Dashboard](https://app.testflight.tremendous.com/) + * @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; +} +/** + * + * @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 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 const ListFundingSources200ResponseFundingSourcesInnerMethodEnum = { + Balance: 'balance', + BankAccount: 'bank_account', + CreditCard: 'credit_card', + Invoice: 'invoice' +} as const; + +export type ListFundingSources200ResponseFundingSourcesInnerMethodEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMethodEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMethodEnum]; +export const ListFundingSources200ResponseFundingSourcesInnerTypeEnum = { + Commercial: 'COMMERCIAL', + ProForma: 'PRO_FORMA', + PrefundingOnly: 'PREFUNDING_ONLY' +} as const; + +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; + /** + * **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 const ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = { + Checking: 'checking', + Savings: 'savings' +} as const; + +export type ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = typeof ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum[keyof typeof ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum]; +export const ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = { + MasterCard: 'MasterCard', + Amex: 'Amex', + Jcb: 'JCB', + DinersClub: 'Diner\'s Club', + Visa: 'visa', + Discover: 'discover', + Laser: 'laser', + Elo: 'elo', + Maestro: 'maestro', + Solo: 'solo' +} as const; + +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 const ListInvoices200ResponseInvoicesInnerStatusEnum = { + Deleted: 'DELETED', + Paid: 'PAID', + Open: 'OPEN', + MarkedAsPaid: 'MARKED_AS_PAID' +} as const; + +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof ListMembers200ResponseMembersInner + */ + 'role': ListMembers200ResponseMembersInnerRoleEnum; + /** + * 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 const ListMembers200ResponseMembersInnerRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type ListMembers200ResponseMembersInnerRoleEnum = typeof ListMembers200ResponseMembersInnerRoleEnum[keyof typeof ListMembers200ResponseMembersInnerRoleEnum]; +export const ListMembers200ResponseMembersInnerStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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.
+ * @type {string} + * @memberof ListOrders200ResponseOrdersInner + */ + 'status': ListOrders200ResponseOrdersInnerStatusEnum; + /** + * + * @type {ListOrders200ResponseOrdersInnerPayment} + * @memberof ListOrders200ResponseOrdersInner + */ + 'payment'?: ListOrders200ResponseOrdersInnerPayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof ListOrders200ResponseOrdersInner + */ + 'invoice_id'?: string; + /** + * + * @type {ListRewards200ResponseRewardsInner} + * @memberof ListOrders200ResponseOrdersInner + */ + 'reward'?: ListRewards200ResponseRewardsInner; +} + +export const ListOrders200ResponseOrdersInnerStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type ListOrders200ResponseOrdersInnerStatusEnum = typeof ListOrders200ResponseOrdersInnerStatusEnum[keyof typeof ListOrders200ResponseOrdersInnerStatusEnum]; + +/** + * 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 const ListOrders200ResponseOrdersInnerPaymentChannelEnum = { + Ui: 'UI', + Api: 'API', + Embed: 'EMBED', + Decipher: 'DECIPHER', + Qualtrics: 'QUALTRICS', + Typeform: 'TYPEFORM', + SurveyMonkey: 'SURVEY MONKEY' +} as const; + +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 const ListOrganizations200ResponseOrganizationsInnerStatusEnum = { + Pending: 'PENDING', + Approved: 'APPROVED', + Rejected: 'REJECTED' +} as const; + +export type ListOrganizations200ResponseOrganizationsInnerStatusEnum = typeof ListOrganizations200ResponseOrganizationsInnerStatusEnum[keyof typeof ListOrganizations200ResponseOrganizationsInnerStatusEnum]; + +/** + * + * @export + * @interface ListProducts200Response + */ +export interface ListProducts200Response { + /** + * + * @type {Array} + * @memberof ListProducts200Response + */ + '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 ListProducts200ResponseProductsInner + */ +export interface ListProducts200ResponseProductsInner { + /** + * + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + 'id': string; + /** + * Name of the product + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + 'name': string; + /** + * Detailed description of the product. Mostly used for products with a `category` of `charities`. + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + '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 ListProducts200ResponseProductsInner + */ + 'category': ListProducts200ResponseProductsInnerCategoryEnum; + /** + * Legal disclosures for this product. Can be in HTML format. + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + '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 ListProducts200ResponseProductsInner + */ + 'skus'?: Array; + /** + * Available currencies for this product + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'currency_codes': Array; + /** + * List of countries in which this product is available to recipients. + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'countries': Array; + /** + * List of product images associated with this product (e.g. logos or images of the gift cards) + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'images': Array; +} + +export const ListProducts200ResponseProductsInnerCategoryEnum = { + Ach: 'ach', + Charity: 'charity', + MerchantCard: 'merchant_card', + Paypal: 'paypal', + Venmo: 'venmo', + VisaCard: 'visa_card' +} as const; + +export type ListProducts200ResponseProductsInnerCategoryEnum = typeof ListProducts200ResponseProductsInnerCategoryEnum[keyof typeof ListProducts200ResponseProductsInnerCategoryEnum]; +export const ListProducts200ResponseProductsInnerCurrencyCodesEnum = { + 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' +} as const; + +export type ListProducts200ResponseProductsInnerCurrencyCodesEnum = typeof ListProducts200ResponseProductsInnerCurrencyCodesEnum[keyof typeof ListProducts200ResponseProductsInnerCurrencyCodesEnum]; + +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerCountriesInner + */ +export interface ListProducts200ResponseProductsInnerCountriesInner { + /** + * ISO 3166 country code + * @type {string} + * @memberof ListProducts200ResponseProductsInnerCountriesInner + */ + 'abbr': string; +} +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerImagesInner + */ +export interface ListProducts200ResponseProductsInnerImagesInner { + /** + * URL to this image + * @type {string} + * @memberof ListProducts200ResponseProductsInnerImagesInner + */ + 'src': string; + /** + * Type of image + * @type {string} + * @memberof ListProducts200ResponseProductsInnerImagesInner + */ + 'type': ListProducts200ResponseProductsInnerImagesInnerTypeEnum; +} + +export const ListProducts200ResponseProductsInnerImagesInnerTypeEnum = { + Card: 'card', + Logo: 'logo' +} as const; + +export type ListProducts200ResponseProductsInnerImagesInnerTypeEnum = typeof ListProducts200ResponseProductsInnerImagesInnerTypeEnum[keyof typeof ListProducts200ResponseProductsInnerImagesInnerTypeEnum]; + +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerSkusInner + */ +export interface ListProducts200ResponseProductsInnerSkusInner { + /** + * Minimal denomination that this product supports (in the product\'s currency) + * @type {number} + * @memberof ListProducts200ResponseProductsInnerSkusInner + */ + 'min': number; + /** + * Maximum denomination that this product supports (in the product\'s currency) + * @type {number} + * @memberof ListProducts200ResponseProductsInnerSkusInner + */ + '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; +} +/** + * 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 const ListRewards200ResponseRewardsInnerDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type ListRewards200ResponseRewardsInnerDeliveryMethodEnum = typeof ListRewards200ResponseRewardsInnerDeliveryMethodEnum[keyof typeof ListRewards200ResponseRewardsInnerDeliveryMethodEnum]; +export const ListRewards200ResponseRewardsInnerDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +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 const 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' +} as const; + +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 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; + /** + * 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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof Member + */ + 'role': MemberRoleEnum; + /** + * 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 const MemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type MemberRoleEnum = typeof MemberRoleEnum[keyof typeof MemberRoleEnum]; +export const MemberStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberBase + */ + 'role': MemberBaseRoleEnum; + /** + * 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 const MemberBaseRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type MemberBaseRoleEnum = typeof MemberBaseRoleEnum[keyof typeof MemberBaseRoleEnum]; +export const MemberBaseStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberWithEvents + */ + 'role': MemberWithEventsRoleEnum; + /** + * 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 const MemberWithEventsRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type MemberWithEventsRoleEnum = typeof MemberWithEventsRoleEnum[keyof typeof MemberWithEventsRoleEnum]; +export const MemberWithEventsStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberWithoutEvents + */ + 'role': MemberWithoutEventsRoleEnum; + /** + * 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 const MemberWithoutEventsRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +} as const; + +export type MemberWithoutEventsRoleEnum = typeof MemberWithoutEventsRoleEnum[keyof typeof MemberWithoutEventsRoleEnum]; +export const MemberWithoutEventsStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +} as const; + +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.
+ * @type {string} + * @memberof Order + */ + 'status': OrderStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof Order + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof Order + */ + 'invoice_id'?: string; + /** + * + * @type {OrderWithoutLinkReward} + * @memberof Order + */ + 'reward'?: OrderWithoutLinkReward; +} + +export const OrderStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; + +/** + * 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.
+ * @type {string} + * @memberof OrderBase + */ + 'status': OrderBaseStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof OrderBase + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof OrderBase + */ + 'invoice_id'?: string; +} + +export const OrderBaseStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type OrderBaseStatusEnum = typeof OrderBaseStatusEnum[keyof typeof OrderBaseStatusEnum]; + +/** + * 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 const OrderBasePaymentChannelEnum = { + Ui: 'UI', + Api: 'API', + Embed: 'EMBED', + Decipher: 'DECIPHER', + Qualtrics: 'QUALTRICS', + Typeform: 'TYPEFORM', + SurveyMonkey: 'SURVEY MONKEY' +} as const; + +export type OrderBasePaymentChannelEnum = typeof OrderBasePaymentChannelEnum[keyof typeof OrderBasePaymentChannelEnum]; + +/** + * + * @export + * @interface OrderForCreate + */ +export interface OrderForCreate { + /** + * 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 OrderForCreate + */ + 'external_id'?: string | null; + /** + * + * @type {CreateOrderRequestPayment} + * @memberof OrderForCreate + */ + 'payment': CreateOrderRequestPayment; + /** + * + * @type {OrderForCreateReward} + * @memberof OrderForCreate + */ + 'reward': OrderForCreateReward; +} +/** + * 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 OrderForCreateReward + */ +export interface OrderForCreateReward { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderForCreateReward + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderForCreateReward + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderForCreateReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'language'?: string; + /** + * + * @type {CreateOrderRequestRewardDelivery} + * @memberof OrderForCreateReward + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * 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.
+ * @export + * @enum {string} + */ + +export const OrderStatus = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus]; + + +/** + * An order wraps around the fulfilment of one or more rewards. + * @export + * @interface OrderWithLink + */ +export interface OrderWithLink { + /** + * Tremendous ID of the order + * @type {string} + * @memberof OrderWithLink + */ + '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 OrderWithLink + */ + '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 OrderWithLink + */ + 'campaign_id'?: string | null; + /** + * Date the order has been created + * @type {string} + * @memberof OrderWithLink + */ + '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.
+ * @type {string} + * @memberof OrderWithLink + */ + 'status': OrderWithLinkStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof OrderWithLink + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof OrderWithLink + */ + 'invoice_id'?: string; + /** + * + * @type {Array} + * @memberof OrderWithLink + */ + 'rewards'?: Array; +} + +export const OrderWithLinkStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type OrderWithLinkStatusEnum = typeof OrderWithLinkStatusEnum[keyof typeof OrderWithLinkStatusEnum]; + +/** + * 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 OrderWithLinkRewardsInner + */ +export interface OrderWithLinkRewardsInner { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderWithLinkRewardsInner + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderWithLinkRewardsInner + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithLinkDelivery} + * @memberof OrderWithLinkRewardsInner + */ + 'delivery'?: RewardWithLinkDelivery; +} +/** + * 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.
+ * @type {string} + * @memberof OrderWithoutLink + */ + 'status': OrderWithoutLinkStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof OrderWithoutLink + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof OrderWithoutLink + */ + 'invoice_id'?: string; + /** + * + * @type {OrderWithoutLinkReward} + * @memberof OrderWithoutLink + */ + 'reward'?: OrderWithoutLinkReward; +} + +export const OrderWithoutLinkStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +} as const; + +export type OrderWithoutLinkStatusEnum = typeof OrderWithoutLinkStatusEnum[keyof typeof OrderWithoutLinkStatusEnum]; + +/** + * 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 OrderWithoutLinkReward + */ +export interface OrderWithoutLinkReward { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderWithoutLinkReward + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderWithoutLinkReward + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderWithoutLinkReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderWithoutLinkReward + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithoutLinkDelivery} + * @memberof OrderWithoutLinkReward + */ + '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 const OrganizationStatusEnum = { + Pending: 'PENDING', + Approved: 'APPROVED', + Rejected: 'REJECTED' +} as const; + +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 const PaymentDetailsChannelEnum = { + Ui: 'UI', + Api: 'API', + Embed: 'EMBED', + Decipher: 'DECIPHER', + Qualtrics: 'QUALTRICS', + Typeform: 'TYPEFORM', + SurveyMonkey: 'SURVEY MONKEY' +} as const; + +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 const ProductCategoryEnum = { + Ach: 'ach', + Charity: 'charity', + MerchantCard: 'merchant_card', + Paypal: 'paypal', + Venmo: 'venmo', + VisaCard: 'visa_card' +} as const; + +export type ProductCategoryEnum = typeof ProductCategoryEnum[keyof typeof ProductCategoryEnum]; +export const 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' +} as const; + +export type ProductCurrencyCodesEnum = typeof ProductCurrencyCodesEnum[keyof typeof ProductCurrencyCodesEnum]; + +/** + * 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; +} +/** + * 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; +} +/** + * 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 {CreateOrderRequestRewardDelivery} + * @memberof RewardForOrderCreate + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * 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 const 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' +} as const; + +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 RewardWithLink + */ +export interface RewardWithLink { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof RewardWithLink + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof RewardWithLink + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof RewardWithLink + */ + '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 RewardWithLink + */ + '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 RewardWithLink + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof RewardWithLink + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof RewardWithLink + */ + '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 RewardWithLink + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof RewardWithLink + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithLinkDelivery} + * @memberof RewardWithLink + */ + 'delivery'?: RewardWithLinkDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface RewardWithLinkDelivery + */ +export interface RewardWithLinkDelivery { + /** + * 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 RewardWithLinkDelivery + */ + 'method': RewardWithLinkDeliveryMethodEnum; + /** + * 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 RewardWithLinkDelivery + */ + 'status': RewardWithLinkDeliveryStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof RewardWithLinkDelivery + */ + 'link'?: string; +} + +export const RewardWithLinkDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type RewardWithLinkDeliveryMethodEnum = typeof RewardWithLinkDeliveryMethodEnum[keyof typeof RewardWithLinkDeliveryMethodEnum]; +export const RewardWithLinkDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +export type RewardWithLinkDeliveryStatusEnum = typeof RewardWithLinkDeliveryStatusEnum[keyof typeof RewardWithLinkDeliveryStatusEnum]; + +/** + * 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 const RewardWithoutLinkDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +} as const; + +export type RewardWithoutLinkDeliveryMethodEnum = typeof RewardWithoutLinkDeliveryMethodEnum[keyof typeof RewardWithoutLinkDeliveryMethodEnum]; +export const RewardWithoutLinkDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +} as const; + +export type RewardWithoutLinkDeliveryStatusEnum = typeof RewardWithoutLinkDeliveryStatusEnum[keyof typeof RewardWithoutLinkDeliveryStatusEnum]; + +/** + * + * @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; +} +/** + * + * @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; + /** + * 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 const BalanceTransactionsApiAxiosParamCreator = function (configuration?: 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: async (offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/balance_transactions`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await 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; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * BalanceTransactionsApi - functional programming interface + * @export + */ +export const BalanceTransactionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async listBalanceTransactions(offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['BalanceTransactionsApi.listBalanceTransactions']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * BalanceTransactionsApi - factory interface + * @export + */ +export const BalanceTransactionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: any): AxiosPromise { + return localVarFp.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * BalanceTransactionsApi - object-oriented interface + * @export + * @class BalanceTransactionsApi + * @extends {BaseAPI} + */ +export 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 + */ + public listBalanceTransactions(offset?: number, limit?: number, createdAtGte?: string, createdAtLte?: string, options?: RawAxiosRequestConfig) { + return BalanceTransactionsApiFp(this.configuration).listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * CampaignsApi - axios parameter creator + * @export + */ +export const CampaignsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/campaigns`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CampaignsApi - functional programming interface + * @export + */ +export const CampaignsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CampaignsApiAxiosParamCreator(configuration) + return { + /** + * 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} + */ + async getCampaign(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaign(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['CampaignsApi.getCampaign']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * Retrieve a list of all campaigns created in your account + * @summary List campaigns + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listCampaigns(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listCampaigns(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['CampaignsApi.listCampaigns']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * CampaignsApi - factory interface + * @export + */ +export const CampaignsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CampaignsApiFp(configuration) + return { + /** + * 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?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.listCampaigns(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * CampaignsApi - object-oriented interface + * @export + * @class CampaignsApi + * @extends {BaseAPI} + */ +export class CampaignsApi extends BaseAPI { + /** + * 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 + */ + public getCampaign(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listCampaigns(options?: RawAxiosRequestConfig) { + return CampaignsApiFp(this.configuration).listCampaigns(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * FieldsApi - axios parameter creator + * @export + */ +export const FieldsApiAxiosParamCreator = function (configuration?: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/fields`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FieldsApi - functional programming interface + * @export + */ +export const FieldsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async listFields(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFields(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FieldsApi.listFields']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * FieldsApi - factory interface + * @export + */ +export const FieldsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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?: any): AxiosPromise { + return localVarFp.listFields(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FieldsApi - object-oriented interface + * @export + * @class FieldsApi + * @extends {BaseAPI} + */ +export 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 + */ + public listFields(options?: RawAxiosRequestConfig) { + return FieldsApiFp(this.configuration).listFields(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * FundingSourcesApi - axios parameter creator + * @export + */ +export const FundingSourcesApiAxiosParamCreator = function (configuration?: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/funding_sources`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FundingSourcesApi - functional programming interface + * @export + */ +export const FundingSourcesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async getFundingSource(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getFundingSource(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FundingSourcesApi.getFundingSource']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listFundingSources(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listFundingSources(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FundingSourcesApi.listFundingSources']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * FundingSourcesApi - factory interface + * @export + */ +export const FundingSourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: string, options?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.listFundingSources(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FundingSourcesApi - object-oriented interface + * @export + * @class FundingSourcesApi + * @extends {BaseAPI} + */ +export 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 + */ + public getFundingSource(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listFundingSources(options?: RawAxiosRequestConfig) { + return FundingSourcesApiFp(this.configuration).listFundingSources(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * InvoicesApi - axios parameter creator + * @export + */ +export const InvoicesApiAxiosParamCreator = function (configuration?: 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: async (createInvoiceRequest: CreateInvoiceRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createInvoiceRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createInvoiceRequest, localVarRequestOptions, configuration) + + return { + url: 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInvoices: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (offset?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/invoices`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * InvoicesApi - functional programming interface + * @export + */ +export const InvoicesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoice(createInvoiceRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.createInvoice']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteInvoices(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInvoices(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.deleteInvoices']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async downloadInvoiceCsv(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadInvoiceCsv(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.downloadInvoiceCsv']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async downloadInvoicePdf(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadInvoicePdf(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.downloadInvoicePdf']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async getInvoice(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoice(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.getInvoice']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listInvoices(offset?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listInvoices(offset, limit, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['InvoicesApi.listInvoices']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * InvoicesApi - factory interface + * @export + */ +export const InvoicesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: CreateInvoiceRequest, options?: any): AxiosPromise { + 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInvoices(id: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: number, limit?: number, options?: any): AxiosPromise { + return localVarFp.listInvoices(offset, limit, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * InvoicesApi - object-oriented interface + * @export + * @class InvoicesApi + * @extends {BaseAPI} + */ +export 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 + */ + public createInvoice(createInvoiceRequest: CreateInvoiceRequest, options?: RawAxiosRequestConfig) { + return 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InvoicesApi + */ + public deleteInvoices(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public downloadInvoiceCsv(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public downloadInvoicePdf(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public getInvoice(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listInvoices(offset?: number, limit?: number, options?: RawAxiosRequestConfig) { + return InvoicesApiFp(this.configuration).listInvoices(offset, limit, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * MembersApi - axios parameter creator + * @export + */ +export const MembersApiAxiosParamCreator = function (configuration?: 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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: async (createMemberRequest: CreateMemberRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createMemberRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createMemberRequest, localVarRequestOptions, configuration) + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/members`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MembersApi - functional programming interface + * @export + */ +export const MembersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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} + */ + async createMember(createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createMember(createMemberRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['MembersApi.createMember']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary Retrieve member + * @param {string} id ID of the member to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMember(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMember(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['MembersApi.getMember']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listMembers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listMembers(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['MembersApi.listMembers']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * MembersApi - factory interface + * @export + */ +export const MembersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.listMembers(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MembersApi - object-oriented interface + * @export + * @class MembersApi + * @extends {BaseAPI} + */ +export 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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 + */ + public createMember(createMemberRequest: CreateMemberRequest, options?: RawAxiosRequestConfig) { + return 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 + */ + public getMember(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listMembers(options?: RawAxiosRequestConfig) { + return MembersApiFp(this.configuration).listMembers(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * OrdersApi - axios parameter creator + * @export + */ +export const OrdersApiAxiosParamCreator = function (configuration?: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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

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: async (createOrderRequest: CreateOrderRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createOrderRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration) + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/orders`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await 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; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrdersApi - functional programming interface + * @export + */ +export const OrdersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async approveOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.approveOrder(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrdersApi.approveOrder']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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

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} + */ + async createOrder(createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(createOrderRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrdersApi.createOrder']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async getOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrdersApi.getOrder']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listOrders(offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrdersApi.listOrders']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async rejectOrder(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOrder(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrdersApi.rejectOrder']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * OrdersApi - factory interface + * @export + */ +export const OrdersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: string, options?: any): AxiosPromise { + 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

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?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + return localVarFp.rejectOrder(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OrdersApi - object-oriented interface + * @export + * @class OrdersApi + * @extends {BaseAPI} + */ +export 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 + */ + public approveOrder(id: string, options?: RawAxiosRequestConfig) { + return 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

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 + */ + public createOrder(createOrderRequest: CreateOrderRequest, options?: RawAxiosRequestConfig) { + return 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 + */ + public getOrder(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listOrders(offset?: number, campaignId?: string, externalId?: string, createdAtGte?: string, createdAtLte?: string, limit?: number, options?: RawAxiosRequestConfig) { + return 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 + */ + public rejectOrder(id: string, options?: RawAxiosRequestConfig) { + return OrdersApiFp(this.configuration).rejectOrder(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * OrganizationsApi - axios parameter creator + * @export + */ +export const OrganizationsApiAxiosParamCreator = function (configuration?: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/organizations/create_api_key`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (createOrganizationRequest: CreateOrganizationRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createOrganizationRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createOrganizationRequest, localVarRequestOptions, configuration) + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/organizations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrganizationsApi - functional programming interface + * @export + */ +export const OrganizationsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async createApiKey(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createApiKey(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrganizationsApi.createApiKey']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async createOrganization(createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrganization(createOrganizationRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrganizationsApi.createOrganization']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary Retrieve organization + * @param {string} id ID of the organization to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrganization(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrganizationsApi.getOrganization']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listOrganizations(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['OrganizationsApi.listOrganizations']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * OrganizationsApi - factory interface + * @export + */ +export const OrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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?: any): AxiosPromise { + 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: CreateOrganizationRequest, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: any): AxiosPromise { + return localVarFp.listOrganizations(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OrganizationsApi - object-oriented interface + * @export + * @class OrganizationsApi + * @extends {BaseAPI} + */ +export 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 + */ + public createApiKey(options?: RawAxiosRequestConfig) { + return 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 + */ + public createOrganization(createOrganizationRequest: CreateOrganizationRequest, options?: RawAxiosRequestConfig) { + return 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 + */ + public getOrganization(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listOrganizations(options?: RawAxiosRequestConfig) { + return OrganizationsApiFp(this.configuration).listOrganizations(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ProductsApi - axios parameter creator + * @export + */ +export const ProductsApiAxiosParamCreator = function (configuration?: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (country?: string, currency?: string, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/products`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (country !== undefined) { + localVarQueryParameter['country'] = country; + } + + if (currency !== undefined) { + localVarQueryParameter['currency'] = currency; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProductsApi - functional programming interface + * @export + */ +export const ProductsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async getProduct(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['ProductsApi.getProduct']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listProducts(country, currency, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['ProductsApi.listProducts']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * ProductsApi - factory interface + * @export + */ +export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: string, options?: any): AxiosPromise { + 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?: string, currency?: string, options?: any): AxiosPromise { + return localVarFp.listProducts(country, currency, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ProductsApi - object-oriented interface + * @export + * @class ProductsApi + * @extends {BaseAPI} + */ +export 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 + */ + public getProduct(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listProducts(country?: string, currency?: string, options?: RawAxiosRequestConfig) { + return ProductsApiFp(this.configuration).listProducts(country, currency, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * RewardsApi - axios parameter creator + * @export + */ +export const RewardsApiAxiosParamCreator = function (configuration?: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (offset?: number, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/rewards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RewardsApi - functional programming interface + * @export + */ +export const RewardsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async generateRewardLink(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.generateRewardLink(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['RewardsApi.generateRewardLink']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async generateRewardToken(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.generateRewardToken(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['RewardsApi.generateRewardToken']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async getReward(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getReward(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['RewardsApi.getReward']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listRewards(offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRewards(offset, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['RewardsApi.listRewards']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async resendReward(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.resendReward(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['RewardsApi.resendReward']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * RewardsApi - factory interface + * @export + */ +export const RewardsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: number, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + return localVarFp.resendReward(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * RewardsApi - object-oriented interface + * @export + * @class RewardsApi + * @extends {BaseAPI} + */ +export 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 + */ + public generateRewardLink(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public generateRewardToken(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public getReward(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listRewards(offset?: number, options?: RawAxiosRequestConfig) { + return 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 + */ + public resendReward(id: string, options?: RawAxiosRequestConfig) { + return RewardsApiFp(this.configuration).resendReward(id, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WebhooksApi - axios parameter creator + * @export + */ +export const WebhooksApiAxiosParamCreator = function (configuration?: 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: async (createWebhookRequest: CreateWebhookRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'createWebhookRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createWebhookRequest, localVarRequestOptions, configuration) + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/webhooks`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: 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: async (id: string, simulateWebhookRequest: SimulateWebhookRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('simulateWebhook', 'id', id) + // verify required parameter 'simulateWebhookRequest' is not null or undefined + 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, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication BearerApiKey required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(simulateWebhookRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WebhooksApi - functional programming interface + * @export + */ +export const WebhooksApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = 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} + */ + async createWebhook(createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWebhook(createWebhookRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WebhooksApi.createWebhook']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async getWebhook(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWebhook(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WebhooksApi.getWebhook']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listWebhookEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhookEvents(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WebhooksApi.listWebhookEvents']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async listWebhooks(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhooks(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WebhooksApi.listWebhooks']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || 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} + */ + async simulateWebhook(id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.simulateWebhook(id, simulateWebhookRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WebhooksApi.simulateWebhook']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * WebhooksApi - factory interface + * @export + */ +export const WebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = 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: CreateWebhookRequest, options?: any): AxiosPromise { + 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 Retrieve webhook + * @param {string} id ID of the webhook to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWebhook(id: string, options?: any): AxiosPromise { + 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: string, options?: any): AxiosPromise { + 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?: any): AxiosPromise { + 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: string, simulateWebhookRequest: SimulateWebhookRequest, options?: any): AxiosPromise { + return localVarFp.simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WebhooksApi - object-oriented interface + * @export + * @class WebhooksApi + * @extends {BaseAPI} + */ +export 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 + */ + public createWebhook(createWebhookRequest: CreateWebhookRequest, options?: RawAxiosRequestConfig) { + return 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 Retrieve webhook + * @param {string} id ID of the webhook to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebhooksApi + */ + public getWebhook(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listWebhookEvents(id: string, options?: RawAxiosRequestConfig) { + return 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 + */ + public listWebhooks(options?: RawAxiosRequestConfig) { + return 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 + */ + public simulateWebhook(id: string, simulateWebhookRequest: SimulateWebhookRequest, options?: RawAxiosRequestConfig) { + return WebhooksApiFp(this.configuration).simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/base.ts b/base.ts new file mode 100644 index 0000000..2875e9a --- /dev/null +++ b/base.ts @@ -0,0 +1,86 @@ +/* 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. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://testflight.tremendous.com/api/v2".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/bin/generate b/bin/generate new file mode 100755 index 0000000..fd79f79 --- /dev/null +++ b/bin/generate @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +spec="$1" + +test -f "$spec" || (echo "USAGE: $0 [PATH TO SPEC FILE]" && exit 1) + +docker run --rm \ + -v ./:/output \ + -v $(realpath $spec):/spec.yml \ + -v ~/tmp:/input \ + openapitools/openapi-generator-cli generate \ + -i /spec.yml \ + -g typescript-axios \ + -o /output \ + -t /output/templates/typescript-axios \ + -p npmName=tremendous,supportsES6=true,modelPropertyNaming=original + +rm git_push.sh +rm tsconfig.esm.json diff --git a/common.ts b/common.ts new file mode 100644 index 0000000..fdde8b5 --- /dev/null +++ b/common.ts @@ -0,0 +1,150 @@ +/* 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. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/configuration.ts b/configuration.ts new file mode 100644 index 0000000..ec7c369 --- /dev/null +++ b/configuration.ts @@ -0,0 +1,115 @@ +/* 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. + */ + + +// 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}`; + +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 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 = {}) { + 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. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/dist/api.d.ts b/dist/api.d.ts new file mode 100644 index 0000000..0259bf8 --- /dev/null +++ b/dist/api.d.ts @@ -0,0 +1,5920 @@ +/** + * 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'; +/** + * 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; +} +/** + * 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. > Note: Campaigns must be created from the Tremendous dashboard. > > • [Production Dashboard](https://app.tremendous.com) > • [Sandbox Dashboard](https://app.testflight.tremendous.com/) + * @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; +} +/** + * + * @export + * @interface CreateApiKey200Response + */ +export interface CreateApiKey200Response { + /** + * The new API key + * @type {string} + * @memberof CreateApiKey200Response + */ + 'api_key'?: string; +} +/** + * + * @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; + /** + * Full name of the member + * @type {string} + * @memberof CreateMember + */ + 'name': string; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
+ * @type {string} + * @memberof CreateMember + */ + 'role': CreateMemberRoleEnum; +} +export declare const CreateMemberRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; +}; +export type CreateMemberRoleEnum = typeof CreateMemberRoleEnum[keyof typeof CreateMemberRoleEnum]; +/** + * + * @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; + /** + * Full name of the member + * @type {string} + * @memberof CreateMemberRequest + */ + 'name': string; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
+ * @type {string} + * @memberof CreateMemberRequest + */ + 'role': CreateMemberRequestRoleEnum; +} +export declare const CreateMemberRequestRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; +}; +export type CreateMemberRequestRoleEnum = typeof CreateMemberRequestRoleEnum[keyof typeof CreateMemberRequestRoleEnum]; +/** + * + * @export + * @interface CreateOrder200Response + */ +export interface CreateOrder200Response { + /** + * + * @type {CreateOrder200ResponseOrder} + * @memberof CreateOrder200Response + */ + 'order': CreateOrder200ResponseOrder; +} +/** + * An order wraps around the fulfilment of one or more rewards. + * @export + * @interface CreateOrder200ResponseOrder + */ +export interface CreateOrder200ResponseOrder { + /** + * Tremendous ID of the order + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + '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 CreateOrder200ResponseOrder + */ + '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 CreateOrder200ResponseOrder + */ + 'campaign_id'?: string | null; + /** + * Date the order has been created + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + '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.
+ * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + 'status': CreateOrder200ResponseOrderStatusEnum; + /** + * + * @type {ListOrders200ResponseOrdersInnerPayment} + * @memberof CreateOrder200ResponseOrder + */ + 'payment'?: ListOrders200ResponseOrdersInnerPayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof CreateOrder200ResponseOrder + */ + 'invoice_id'?: string; + /** + * + * @type {Array} + * @memberof CreateOrder200ResponseOrder + */ + 'rewards'?: Array; +} +export declare const CreateOrder200ResponseOrderStatusEnum: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type CreateOrder200ResponseOrderStatusEnum = typeof CreateOrder200ResponseOrderStatusEnum[keyof typeof CreateOrder200ResponseOrderStatusEnum]; +/** + * 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 CreateOrder200ResponseOrderRewardsInner + */ +export interface CreateOrder200ResponseOrderRewardsInner { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'created_at'?: string; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + '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 CreateOrder200ResponseOrderRewardsInner + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'custom_fields'?: Array; + /** + * + * @type {CreateOrder200ResponseOrderRewardsInnerDelivery} + * @memberof CreateOrder200ResponseOrderRewardsInner + */ + 'delivery'?: CreateOrder200ResponseOrderRewardsInnerDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface CreateOrder200ResponseOrderRewardsInnerDelivery + */ +export interface CreateOrder200ResponseOrderRewardsInnerDelivery { + /** + * 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 CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'method': CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum; + /** + * 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 CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'status': CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof CreateOrder200ResponseOrderRewardsInnerDelivery + */ + 'link'?: string; +} +export declare const CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum: { + readonly Email: "EMAIL"; + readonly Link: "LINK"; + readonly Phone: "PHONE"; +}; +export type CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = typeof CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum[keyof typeof CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum]; +export declare const CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum: { + readonly Scheduled: "SCHEDULED"; + readonly Failed: "FAILED"; + readonly Succeeded: "SUCCEEDED"; + readonly Pending: "PENDING"; +}; +export type CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum[keyof typeof CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum]; +/** + * + * @export + * @interface CreateOrder201Response + */ +export interface CreateOrder201Response { + /** + * + * @type {ListOrders200ResponseOrdersInner} + * @memberof CreateOrder201Response + */ + 'order': ListOrders200ResponseOrdersInner; +} +/** + * + * @export + * @interface CreateOrderRequest + */ +export interface CreateOrderRequest { + /** + * 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 CreateOrderRequest + */ + 'external_id'?: string | null; + /** + * + * @type {CreateOrderRequestPayment} + * @memberof CreateOrderRequest + */ + 'payment': CreateOrderRequestPayment; + /** + * + * @type {CreateOrderRequestReward} + * @memberof CreateOrderRequest + */ + 'reward': CreateOrderRequestReward; +} +/** + * + * @export + * @interface CreateOrderRequestPayment + */ +export interface CreateOrderRequestPayment { + /** + * 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 CreateOrderRequestPayment + */ + '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 CreateOrderRequestReward + */ +export interface CreateOrderRequestReward { + /** + * 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 CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof CreateOrderRequestReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof CreateOrderRequestReward + */ + '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 CreateOrderRequestReward + */ + 'language'?: string; + /** + * + * @type {CreateOrderRequestRewardDelivery} + * @memberof CreateOrderRequestReward + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface CreateOrderRequestRewardDelivery + */ +export interface CreateOrderRequestRewardDelivery { + /** + * 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 CreateOrderRequestRewardDelivery + */ + 'method'?: CreateOrderRequestRewardDeliveryMethodEnum; +} +export declare const CreateOrderRequestRewardDeliveryMethodEnum: { + readonly Email: "EMAIL"; + readonly Link: "LINK"; + readonly Phone: "PHONE"; +}; +export type CreateOrderRequestRewardDeliveryMethodEnum = typeof CreateOrderRequestRewardDeliveryMethodEnum[keyof typeof CreateOrderRequestRewardDeliveryMethodEnum]; +/** + * + * @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 from the current organization to the new organization. Defaults to `false`. + * @type {boolean} + * @memberof CreateOrganizationRequestCopySettings + */ + 'users'?: boolean; +} +/** + * + * @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; +} +/** + * 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]; +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface DeliveryDetailsWithLink + */ +export interface DeliveryDetailsWithLink { + /** + * 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 DeliveryDetailsWithLink + */ + 'method': DeliveryDetailsWithLinkMethodEnum; + /** + * 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 DeliveryDetailsWithLink + */ + 'status': DeliveryDetailsWithLinkStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof DeliveryDetailsWithLink + */ + 'link'?: string; +} +export declare const DeliveryDetailsWithLinkMethodEnum: { + readonly Email: "EMAIL"; + readonly Link: "LINK"; + readonly Phone: "PHONE"; +}; +export type DeliveryDetailsWithLinkMethodEnum = typeof DeliveryDetailsWithLinkMethodEnum[keyof typeof DeliveryDetailsWithLinkMethodEnum]; +export declare const DeliveryDetailsWithLinkStatusEnum: { + readonly Scheduled: "SCHEDULED"; + readonly Failed: "FAILED"; + readonly Succeeded: "SUCCEEDED"; + readonly Pending: "PENDING"; +}; +export type DeliveryDetailsWithLinkStatusEnum = typeof DeliveryDetailsWithLinkStatusEnum[keyof typeof DeliveryDetailsWithLinkStatusEnum]; +/** + * 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 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 GetCampaign200Response + */ +export interface GetCampaign200Response { + /** + * + * @type {ListCampaigns200ResponseCampaignsInner} + * @memberof GetCampaign200Response + */ + 'campaign': ListCampaigns200ResponseCampaignsInner; +} +/** + * + * @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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof GetMember200ResponseMember + */ + 'role': GetMember200ResponseMemberRoleEnum; + /** + * 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 GetMember200ResponseMemberRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type GetMember200ResponseMemberRoleEnum = typeof GetMember200ResponseMemberRoleEnum[keyof typeof GetMember200ResponseMemberRoleEnum]; +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 GetProduct200Response + */ +export interface GetProduct200Response { + /** + * + * @type {ListProducts200ResponseProductsInner} + * @memberof GetProduct200Response + */ + 'product': ListProducts200ResponseProductsInner; +} +/** + * + * @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 + */ + 'invoices'?: Array; +} +/** + * A balance transaction represents a specific movement or change in an account\'s balance. + * @export + * @interface ListBalanceTransactions200ResponseInvoicesInner + */ +export interface ListBalanceTransactions200ResponseInvoicesInner { + /** + * Date that the transaction was created + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'created_at'?: string; + /** + * Amount of the transaction in USD + * @type {number} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'amount'?: number; + /** + * The updated total after the transaction. Note that this running balance may be delayed and contain `null`. + * @type {number} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'balance'?: number; + /** + * The action that was performed + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + 'action'?: string; + /** + * A brief description of the transaction + * @type {string} + * @memberof ListBalanceTransactions200ResponseInvoicesInner + */ + '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. > Note: Campaigns must be created from the Tremendous dashboard. > > • [Production Dashboard](https://app.tremendous.com) > • [Sandbox Dashboard](https://app.testflight.tremendous.com/) + * @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; +} +/** + * + * @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 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; + /** + * **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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof ListMembers200ResponseMembersInner + */ + 'role': ListMembers200ResponseMembersInnerRoleEnum; + /** + * 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 ListMembers200ResponseMembersInnerRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type ListMembers200ResponseMembersInnerRoleEnum = typeof ListMembers200ResponseMembersInnerRoleEnum[keyof typeof ListMembers200ResponseMembersInnerRoleEnum]; +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.
+ * @type {string} + * @memberof ListOrders200ResponseOrdersInner + */ + 'status': ListOrders200ResponseOrdersInnerStatusEnum; + /** + * + * @type {ListOrders200ResponseOrdersInnerPayment} + * @memberof ListOrders200ResponseOrdersInner + */ + 'payment'?: ListOrders200ResponseOrdersInnerPayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof ListOrders200ResponseOrdersInner + */ + 'invoice_id'?: string; + /** + * + * @type {ListRewards200ResponseRewardsInner} + * @memberof ListOrders200ResponseOrdersInner + */ + 'reward'?: ListRewards200ResponseRewardsInner; +} +export declare const ListOrders200ResponseOrdersInnerStatusEnum: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type ListOrders200ResponseOrdersInnerStatusEnum = typeof ListOrders200ResponseOrdersInnerStatusEnum[keyof typeof ListOrders200ResponseOrdersInnerStatusEnum]; +/** + * 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 ListProducts200Response + */ +export interface ListProducts200Response { + /** + * + * @type {Array} + * @memberof ListProducts200Response + */ + '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 ListProducts200ResponseProductsInner + */ +export interface ListProducts200ResponseProductsInner { + /** + * + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + 'id': string; + /** + * Name of the product + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + 'name': string; + /** + * Detailed description of the product. Mostly used for products with a `category` of `charities`. + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + '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 ListProducts200ResponseProductsInner + */ + 'category': ListProducts200ResponseProductsInnerCategoryEnum; + /** + * Legal disclosures for this product. Can be in HTML format. + * @type {string} + * @memberof ListProducts200ResponseProductsInner + */ + '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 ListProducts200ResponseProductsInner + */ + 'skus'?: Array; + /** + * Available currencies for this product + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'currency_codes': Array; + /** + * List of countries in which this product is available to recipients. + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'countries': Array; + /** + * List of product images associated with this product (e.g. logos or images of the gift cards) + * @type {Array} + * @memberof ListProducts200ResponseProductsInner + */ + 'images': Array; +} +export declare const ListProducts200ResponseProductsInnerCategoryEnum: { + readonly Ach: "ach"; + readonly Charity: "charity"; + readonly MerchantCard: "merchant_card"; + readonly Paypal: "paypal"; + readonly Venmo: "venmo"; + readonly VisaCard: "visa_card"; +}; +export type ListProducts200ResponseProductsInnerCategoryEnum = typeof ListProducts200ResponseProductsInnerCategoryEnum[keyof typeof ListProducts200ResponseProductsInnerCategoryEnum]; +export declare const ListProducts200ResponseProductsInnerCurrencyCodesEnum: { + 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 ListProducts200ResponseProductsInnerCurrencyCodesEnum = typeof ListProducts200ResponseProductsInnerCurrencyCodesEnum[keyof typeof ListProducts200ResponseProductsInnerCurrencyCodesEnum]; +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerCountriesInner + */ +export interface ListProducts200ResponseProductsInnerCountriesInner { + /** + * ISO 3166 country code + * @type {string} + * @memberof ListProducts200ResponseProductsInnerCountriesInner + */ + 'abbr': string; +} +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerImagesInner + */ +export interface ListProducts200ResponseProductsInnerImagesInner { + /** + * URL to this image + * @type {string} + * @memberof ListProducts200ResponseProductsInnerImagesInner + */ + 'src': string; + /** + * Type of image + * @type {string} + * @memberof ListProducts200ResponseProductsInnerImagesInner + */ + 'type': ListProducts200ResponseProductsInnerImagesInnerTypeEnum; +} +export declare const ListProducts200ResponseProductsInnerImagesInnerTypeEnum: { + readonly Card: "card"; + readonly Logo: "logo"; +}; +export type ListProducts200ResponseProductsInnerImagesInnerTypeEnum = typeof ListProducts200ResponseProductsInnerImagesInnerTypeEnum[keyof typeof ListProducts200ResponseProductsInnerImagesInnerTypeEnum]; +/** + * + * @export + * @interface ListProducts200ResponseProductsInnerSkusInner + */ +export interface ListProducts200ResponseProductsInnerSkusInner { + /** + * Minimal denomination that this product supports (in the product\'s currency) + * @type {number} + * @memberof ListProducts200ResponseProductsInnerSkusInner + */ + 'min': number; + /** + * Maximum denomination that this product supports (in the product\'s currency) + * @type {number} + * @memberof ListProducts200ResponseProductsInnerSkusInner + */ + '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; +} +/** + * 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 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; + /** + * 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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof Member + */ + 'role': MemberRoleEnum; + /** + * 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 MemberRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type MemberRoleEnum = typeof MemberRoleEnum[keyof typeof MemberRoleEnum]; +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberBase + */ + 'role': MemberBaseRoleEnum; + /** + * 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 MemberBaseRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type MemberBaseRoleEnum = typeof MemberBaseRoleEnum[keyof typeof MemberBaseRoleEnum]; +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberWithEvents + */ + 'role': MemberWithEventsRoleEnum; + /** + * 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 MemberWithEventsRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type MemberWithEventsRoleEnum = typeof MemberWithEventsRoleEnum[keyof typeof MemberWithEventsRoleEnum]; +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; + /** + * Role of the member within the organization.
Role Description
MEMBER Limited permissions. Can view their own reward and order histories only.
ADMIN Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization.
DELETED No longer a member of this organization.
+ * @type {string} + * @memberof MemberWithoutEvents + */ + 'role': MemberWithoutEventsRoleEnum; + /** + * 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 MemberWithoutEventsRoleEnum: { + readonly Member: "MEMBER"; + readonly Admin: "ADMIN"; + readonly Deleted: "DELETED"; +}; +export type MemberWithoutEventsRoleEnum = typeof MemberWithoutEventsRoleEnum[keyof typeof MemberWithoutEventsRoleEnum]; +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.
+ * @type {string} + * @memberof Order + */ + 'status': OrderStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof Order + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof Order + */ + 'invoice_id'?: string; + /** + * + * @type {OrderWithoutLinkReward} + * @memberof Order + */ + 'reward'?: OrderWithoutLinkReward; +} +export declare const OrderStatusEnum: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum]; +/** + * 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.
+ * @type {string} + * @memberof OrderBase + */ + 'status': OrderBaseStatusEnum; + /** + * + * @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"; +}; +export type OrderBaseStatusEnum = typeof OrderBaseStatusEnum[keyof typeof OrderBaseStatusEnum]; +/** + * 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]; +/** + * + * @export + * @interface OrderForCreate + */ +export interface OrderForCreate { + /** + * 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 OrderForCreate + */ + 'external_id'?: string | null; + /** + * + * @type {CreateOrderRequestPayment} + * @memberof OrderForCreate + */ + 'payment': CreateOrderRequestPayment; + /** + * + * @type {OrderForCreateReward} + * @memberof OrderForCreate + */ + 'reward': OrderForCreateReward; +} +/** + * 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 OrderForCreateReward + */ +export interface OrderForCreateReward { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderForCreateReward + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderForCreateReward + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderForCreateReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderForCreateReward + */ + '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 OrderForCreateReward + */ + 'language'?: string; + /** + * + * @type {CreateOrderRequestRewardDelivery} + * @memberof OrderForCreateReward + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * 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.
+ * @export + * @enum {string} + */ +export declare const OrderStatus: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus]; +/** + * An order wraps around the fulfilment of one or more rewards. + * @export + * @interface OrderWithLink + */ +export interface OrderWithLink { + /** + * Tremendous ID of the order + * @type {string} + * @memberof OrderWithLink + */ + '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 OrderWithLink + */ + '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 OrderWithLink + */ + 'campaign_id'?: string | null; + /** + * Date the order has been created + * @type {string} + * @memberof OrderWithLink + */ + '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.
+ * @type {string} + * @memberof OrderWithLink + */ + 'status': OrderWithLinkStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof OrderWithLink + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof OrderWithLink + */ + 'invoice_id'?: string; + /** + * + * @type {Array} + * @memberof OrderWithLink + */ + 'rewards'?: Array; +} +export declare const OrderWithLinkStatusEnum: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type OrderWithLinkStatusEnum = typeof OrderWithLinkStatusEnum[keyof typeof OrderWithLinkStatusEnum]; +/** + * 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 OrderWithLinkRewardsInner + */ +export interface OrderWithLinkRewardsInner { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderWithLinkRewardsInner + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderWithLinkRewardsInner + */ + '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 OrderWithLinkRewardsInner + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderWithLinkRewardsInner + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithLinkDelivery} + * @memberof OrderWithLinkRewardsInner + */ + 'delivery'?: RewardWithLinkDelivery; +} +/** + * 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.
+ * @type {string} + * @memberof OrderWithoutLink + */ + 'status': OrderWithoutLinkStatusEnum; + /** + * + * @type {OrderBasePayment} + * @memberof OrderWithoutLink + */ + 'payment'?: OrderBasePayment; + /** + * The ID for the invoice associated with this order + * @type {string} + * @memberof OrderWithoutLink + */ + 'invoice_id'?: string; + /** + * + * @type {OrderWithoutLinkReward} + * @memberof OrderWithoutLink + */ + 'reward'?: OrderWithoutLinkReward; +} +export declare const OrderWithoutLinkStatusEnum: { + readonly Canceled: "CANCELED"; + readonly Cart: "CART"; + readonly Executed: "EXECUTED"; + readonly Failed: "FAILED"; + readonly PendingApproval: "PENDING APPROVAL"; +}; +export type OrderWithoutLinkStatusEnum = typeof OrderWithoutLinkStatusEnum[keyof typeof OrderWithoutLinkStatusEnum]; +/** + * 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 OrderWithoutLinkReward + */ +export interface OrderWithoutLinkReward { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof OrderWithoutLinkReward + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof OrderWithoutLinkReward + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof OrderWithoutLinkReward + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof OrderWithoutLinkReward + */ + '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 OrderWithoutLinkReward + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof OrderWithoutLinkReward + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithoutLinkDelivery} + * @memberof OrderWithoutLinkReward + */ + '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]; +/** + * 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; +} +/** + * 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; +} +/** + * 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 {CreateOrderRequestRewardDelivery} + * @memberof RewardForOrderCreate + */ + 'delivery'?: CreateOrderRequestRewardDelivery; +} +/** + * 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 RewardWithLink + */ +export interface RewardWithLink { + /** + * Tremendous ID of the reward + * @type {string} + * @memberof RewardWithLink + */ + 'id'?: string; + /** + * Tremendous ID of the order this reward is part of. + * @type {string} + * @memberof RewardWithLink + */ + 'order_id'?: string; + /** + * Date the reward was created + * @type {string} + * @memberof RewardWithLink + */ + '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 RewardWithLink + */ + '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 RewardWithLink + */ + 'products'?: Array; + /** + * + * @type {ListRewards200ResponseRewardsInnerValue} + * @memberof RewardWithLink + */ + 'value'?: ListRewards200ResponseRewardsInnerValue; + /** + * + * @type {ListRewards200ResponseRewardsInnerRecipient} + * @memberof RewardWithLink + */ + '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 RewardWithLink + */ + 'deliver_at'?: string; + /** + * + * @type {Array} + * @memberof RewardWithLink + */ + 'custom_fields'?: Array; + /** + * + * @type {RewardWithLinkDelivery} + * @memberof RewardWithLink + */ + 'delivery'?: RewardWithLinkDelivery; +} +/** + * Details on how the reward is delivered to the recipient. + * @export + * @interface RewardWithLinkDelivery + */ +export interface RewardWithLinkDelivery { + /** + * 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 RewardWithLinkDelivery + */ + 'method': RewardWithLinkDeliveryMethodEnum; + /** + * 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 RewardWithLinkDelivery + */ + 'status': RewardWithLinkDeliveryStatusEnum; + /** + * Link to redeem the reward at. You need to deliver this link to the recipient. Only available for rewards for which the `method` for delivery is set to `LINK`. + * @type {string} + * @memberof RewardWithLinkDelivery + */ + 'link'?: string; +} +export declare const RewardWithLinkDeliveryMethodEnum: { + readonly Email: "EMAIL"; + readonly Link: "LINK"; + readonly Phone: "PHONE"; +}; +export type RewardWithLinkDeliveryMethodEnum = typeof RewardWithLinkDeliveryMethodEnum[keyof typeof RewardWithLinkDeliveryMethodEnum]; +export declare const RewardWithLinkDeliveryStatusEnum: { + readonly Scheduled: "SCHEDULED"; + readonly Failed: "FAILED"; + readonly Succeeded: "SUCCEEDED"; + readonly Pending: "PENDING"; +}; +export type RewardWithLinkDeliveryStatusEnum = typeof RewardWithLinkDeliveryStatusEnum[keyof typeof RewardWithLinkDeliveryStatusEnum]; +/** + * 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]; +/** + * + * @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; +} +/** + * + * @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; + /** + * 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?: any): 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) => { + /** + * 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; +}; +/** + * CampaignsApi - functional programming interface + * @export + */ +export declare const CampaignsApiFp: (configuration?: Configuration) => { + /** + * 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>; +}; +/** + * CampaignsApi - factory interface + * @export + */ +export declare const CampaignsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { + /** + * 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?: any): AxiosPromise; + /** + * Retrieve a list of all campaigns created in your account + * @summary List campaigns + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCampaigns(options?: any): AxiosPromise; +}; +/** + * CampaignsApi - object-oriented interface + * @export + * @class CampaignsApi + * @extends {BaseAPI} + */ +export declare class CampaignsApi extends BaseAPI { + /** + * 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>; +} +/** + * 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?: any): 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>; +} +/** + * 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?: any): 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?: any): 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 retrieved + * @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 retrieved + * @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?: any): 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInvoices(id: string, options?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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 retrieved + * @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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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?: any): 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?: any): 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?: any): 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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

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

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?: any): 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

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?: any): 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?: any): 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?: any): 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?: any): 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

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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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>; +} +/** + * 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 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 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?: any): 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?: any): 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?: any): 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?: any): 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?: any): 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 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 new file mode 100644 index 0000000..31c82f0 --- /dev/null +++ b/dist/api.js @@ -0,0 +1,3888 @@ +"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.OrderWithoutLinkStatusEnum = exports.OrderWithLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseStatusEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithoutEventsRoleEnum = exports.MemberWithEventsStatusEnum = exports.MemberWithEventsRoleEnum = exports.MemberBaseStatusEnum = exports.MemberBaseRoleEnum = exports.MemberStatusEnum = exports.MemberRoleEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProducts200ResponseProductsInnerImagesInnerTypeEnum = exports.ListProducts200ResponseProductsInnerCurrencyCodesEnum = exports.ListProducts200ResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerRoleEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetMember200ResponseMemberRoleEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsWithLinkStatusEnum = exports.DeliveryDetailsWithLinkMethodEnum = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateOrganization200ResponseOrganizationStatusEnum = exports.CreateOrderRequestRewardDeliveryMethodEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderStatusEnum = exports.CreateMemberRequestRoleEnum = exports.CreateMemberRoleEnum = void 0; +exports.WebhooksApiAxiosParamCreator = 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.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = exports.FieldsApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardWithLinkDeliveryStatusEnum = exports.RewardWithLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PaymentDetailsChannelEnum = exports.OrganizationStatusEnum = void 0; +exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = 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"); +exports.CreateMemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN' +}; +exports.CreateMemberRequestRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN' +}; +exports.CreateOrder200ResponseOrderStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +}; +exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +}; +exports.CreateOrderRequestRewardDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +}; +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' +}; +exports.DeliveryDetailsWithLinkMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +}; +exports.DeliveryDetailsWithLinkStatusEnum = { + 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.FundingSourceMethodEnum = { + Balance: 'balance', + BankAccount: 'bank_account', + CreditCard: 'credit_card', + Invoice: 'invoice' +}; +exports.FundingSourceTypeEnum = { + Commercial: 'COMMERCIAL', + ProForma: 'PRO_FORMA', + PrefundingOnly: 'PREFUNDING_ONLY' +}; +exports.GetMember200ResponseMemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +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.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.ListMembers200ResponseMembersInnerRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +exports.ListMembers200ResponseMembersInnerStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +}; +exports.ListOrders200ResponseOrdersInnerStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +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.ListProducts200ResponseProductsInnerCategoryEnum = { + Ach: 'ach', + Charity: 'charity', + MerchantCard: 'merchant_card', + Paypal: 'paypal', + Venmo: 'venmo', + VisaCard: 'visa_card' +}; +exports.ListProducts200ResponseProductsInnerCurrencyCodesEnum = { + 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.ListProducts200ResponseProductsInnerImagesInnerTypeEnum = { + 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.MemberRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +exports.MemberStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +}; +exports.MemberBaseRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +exports.MemberBaseStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +}; +exports.MemberWithEventsRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +exports.MemberWithEventsStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +}; +exports.MemberWithoutEventsRoleEnum = { + Member: 'MEMBER', + Admin: 'ADMIN', + Deleted: 'DELETED' +}; +exports.MemberWithoutEventsStatusEnum = { + Registered: 'REGISTERED', + Invited: 'INVITED' +}; +exports.OrderStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +exports.OrderBaseStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +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.
+ * @export + * @enum {string} + */ +exports.OrderStatus = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +exports.OrderWithLinkStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +exports.OrderWithoutLinkStatusEnum = { + Canceled: 'CANCELED', + Cart: 'CART', + Executed: 'EXECUTED', + Failed: 'FAILED', + PendingApproval: 'PENDING APPROVAL' +}; +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.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.RewardWithLinkDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +}; +exports.RewardWithLinkDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +}; +exports.RewardWithoutLinkDeliveryMethodEnum = { + Email: 'EMAIL', + Link: 'LINK', + Phone: 'PHONE' +}; +exports.RewardWithoutLinkDeliveryStatusEnum = { + Scheduled: 'SCHEDULED', + Failed: 'FAILED', + Succeeded: 'SUCCEEDED', + Pending: 'PENDING' +}; +/** + * 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, limit, createdAtGte, createdAtLte, options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['BalanceTransactionsApi.listBalanceTransactions']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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 { + /** + * 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 = {}) => __awaiter(this, void 0, void 0, function* () { + // 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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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, + }; + }), + }; +}; +exports.CampaignsApiAxiosParamCreator = CampaignsApiAxiosParamCreator; +/** + * CampaignsApi - functional programming interface + * @export + */ +const CampaignsApiFp = function (configuration) { + const localVarAxiosParamCreator = (0, exports.CampaignsApiAxiosParamCreator)(configuration); + return { + /** + * 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaign(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.getCampaign']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || basePath); + }); + }, + /** + * Retrieve a list of all campaigns created in your account + * @summary List campaigns + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listCampaigns(options) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listCampaigns(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.listCampaigns']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || basePath); + }); + }, + }; +}; +exports.CampaignsApiFp = CampaignsApiFp; +/** + * CampaignsApi - factory interface + * @export + */ +const CampaignsApiFactory = function (configuration, basePath, axios) { + const localVarFp = (0, exports.CampaignsApiFp)(configuration); + return { + /** + * 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)); + }, + }; +}; +exports.CampaignsApiFactory = CampaignsApiFactory; +/** + * CampaignsApi - object-oriented interface + * @export + * @class CampaignsApi + * @extends {BaseAPI} + */ +class CampaignsApi extends base_1.BaseAPI { + /** + * 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)); + } +} +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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listFields(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['FieldsApi.listFields']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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; +/** + * 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getFundingSource(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.getFundingSource']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listFundingSources(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.listFundingSources']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInvoices: (id, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, limit, options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createInvoice(createInvoiceRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.createInvoice']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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 retrieved + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteInvoices(id, options) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInvoices(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.deleteInvoices']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoiceCsv(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoiceCsv']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoicePdf(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoicePdf']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getInvoice(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.getInvoice']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listInvoices(offset, limit, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.listInvoices']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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 retrieved + * @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 retrieved + * @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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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 = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createMember(createMemberRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.createMember']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || basePath); + }); + }, + /** + * + * @summary Retrieve member + * @param {string} id ID of the member to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMember(id, options) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getMember(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.getMember']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listMembers(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.listMembers']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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 one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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

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 = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, campaignId, externalId, createdAtGte, createdAtLte, limit, options = {}) => __awaiter(this, void 0, void 0, function* () { + 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.approveOrder(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.approveOrder']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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

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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.listOrders']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.rejectOrder(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.rejectOrder']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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

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

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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createApiKey(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createApiKey']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrganization(createOrganizationRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createOrganization']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || basePath); + }); + }, + /** + * + * @summary Retrieve organization + * @param {string} id ID of the organization to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrganization(id, options) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrganization(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.getOrganization']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrganizations(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.listOrganizations']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, currency, options = {}) => __awaiter(this, void 0, void 0, function* () { + 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getProduct(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.getProduct']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(country, currency, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.listProducts']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardLink(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardLink']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardToken(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardToken']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getReward(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getReward']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listRewards(offset, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.listRewards']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.resendReward(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.resendReward']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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; +/** + * 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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 Retrieve webhook + * @param {string} id ID of the webhook to retrieve + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWebhook: (id, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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: (options = {}) => __awaiter(this, void 0, void 0, function* () { + 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, simulateWebhookRequest, options = {}) => __awaiter(this, void 0, void 0, function* () { + // 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.createWebhook(createWebhookRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.createWebhook']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebhook(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.getWebhook']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhookEvents(id, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhookEvents']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhooks(options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhooks']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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) { + var _a, _b, _c; + return __awaiter(this, void 0, void 0, function* () { + const localVarAxiosArgs = yield localVarAxiosParamCreator.simulateWebhook(id, simulateWebhookRequest, options); + const index = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0; + const operationBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.simulateWebhook']) === null || _b === void 0 ? void 0 : _b[index]) === 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, operationBasePath || 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 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 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 new file mode 100644 index 0000000..dfe687d --- /dev/null +++ b/dist/base.d.ts @@ -0,0 +1,66 @@ +/** + * 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 new file mode 100644 index 0000000..eb63e77 --- /dev/null +++ b/dist/base.js @@ -0,0 +1,65 @@ +"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 new file mode 100644 index 0000000..e7d7ce5 --- /dev/null +++ b/dist/common.d.ts @@ -0,0 +1,65 @@ +/** + * 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 new file mode 100644 index 0000000..aa297d3 --- /dev/null +++ b/dist/common.js @@ -0,0 +1,161 @@ +"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 new file mode 100644 index 0000000..fc4a2a7 --- /dev/null +++ b/dist/configuration.d.ts @@ -0,0 +1,91 @@ +/** + * 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 new file mode 100644 index 0000000..adad732 --- /dev/null +++ b/dist/configuration.js @@ -0,0 +1,47 @@ +"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 new file mode 100644 index 0000000..1028f63 --- /dev/null +++ b/dist/environments.d.ts @@ -0,0 +1,5 @@ +interface Environments { + [env: string]: string; +} +export declare const Environments: Environments; +export {}; diff --git a/dist/environments.js b/dist/environments.js new file mode 100644 index 0000000..db1dc59 --- /dev/null +++ b/dist/environments.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Environments = void 0; +exports.Environments = { + production: 'https://www.tremendous.com/api/v2', + testflight: 'https://testflight.tremendous.com/api/v2', +}; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..dff0b9e --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,14 @@ +/** + * 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 new file mode 100644 index 0000000..b3ba8be --- /dev/null +++ b/dist/index.js @@ -0,0 +1,32 @@ +"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); diff --git a/environments.ts b/environments.ts new file mode 100644 index 0000000..8dde500 --- /dev/null +++ b/environments.ts @@ -0,0 +1,8 @@ +interface Environments { + [env: string]: string; +} + +export const Environments: Environments = { + production: 'https://www.tremendous.com/api/v2', + testflight: 'https://testflight.tremendous.com/api/v2', +}; diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..068577e --- /dev/null +++ b/index.ts @@ -0,0 +1,19 @@ +/* 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. + */ + + +export * from "./api"; +export * from "./configuration"; +export * from "./environments"; + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3bbb31c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2597 @@ +{ + "name": "tremendous", + "version": "3.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "tremendous", + "version": "3.0.0", + "dependencies": { + "axios": "^1.6.1" + }, + "devDependencies": { + "@types/node": "^20.11.9", + "typescript": "^5.3.3", + "vitest": "^1.3.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", + "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", + "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", + "integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", + "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", + "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", + "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", + "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", + "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", + "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", + "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", + "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", + "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", + "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@vitest/expect": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.0.tgz", + "integrity": "sha512-7bWt0vBTZj08B+Ikv70AnLRicohYwFgzNjFqo9SxxqHHxSlUJGSXmCRORhOnRMisiUryKMdvsi1n27Bc6jL9DQ==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.3.0", + "@vitest/utils": "1.3.0", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.0.tgz", + "integrity": "sha512-1Jb15Vo/Oy7mwZ5bXi7zbgszsdIBNjc4IqP8Jpr/8RdBC4nF1CTzIAn2dxYvpF1nGSseeL39lfLQ2uvs5u1Y9A==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.3.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.0.tgz", + "integrity": "sha512-swmktcviVVPYx9U4SEQXLV6AEY51Y6bZ14jA2yo6TgMxQ3h+ZYiO0YhAHGJNp0ohCFbPAis1R9kK0cvN6lDPQA==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.0.tgz", + "integrity": "sha512-AkCU0ThZunMvblDpPKgjIi025UxR8V7MZ/g/EwmAGpjIujLVV2X6rGYGmxE2D4FJbAy0/ijdROHMWa2M/6JVMw==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.0.tgz", + "integrity": "sha512-/LibEY/fkaXQufi4GDlQZhikQsPO2entBKtfuyIpr1jV4DpaeasqkeHjhdOhU24vSHshcSuEyVlWdzvv2XmYCw==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chai": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz", + "integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==", + "dev": true + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true + }, + "node_modules/local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "dependencies": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mlly": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", + "integrity": "sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==", + "dev": true, + "dependencies": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "ufo": "^1.3.2" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/npm-run-path": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "node_modules/postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/rollup": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", + "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.12.0", + "@rollup/rollup-android-arm64": "4.12.0", + "@rollup/rollup-darwin-arm64": "4.12.0", + "@rollup/rollup-darwin-x64": "4.12.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", + "@rollup/rollup-linux-arm64-gnu": "4.12.0", + "@rollup/rollup-linux-arm64-musl": "4.12.0", + "@rollup/rollup-linux-riscv64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-musl": "4.12.0", + "@rollup/rollup-win32-arm64-msvc": "4.12.0", + "@rollup/rollup-win32-ia32-msvc": "4.12.0", + "@rollup/rollup-win32-x64-msvc": "4.12.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.0.0.tgz", + "integrity": "sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==", + "dev": true, + "dependencies": { + "js-tokens": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/tinybench": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", + "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==", + "dev": true + }, + "node_modules/tinypool": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", + "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.4.0.tgz", + "integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==", + "dev": true + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/vite": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", + "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.35", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.0.tgz", + "integrity": "sha512-D/oiDVBw75XMnjAXne/4feCkCEwcbr2SU1bjAhCcfI5Bq3VoOHji8/wCPAfUkDIeohJ5nSZ39fNxM3dNZ6OBOA==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.0.tgz", + "integrity": "sha512-V9qb276J1jjSx9xb75T2VoYXdO1UKi+qfflY7V7w93jzX7oA/+RtYE6TcifxksxsZvygSSMwu2Uw6di7yqDMwg==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.3.0", + "@vitest/runner": "1.3.0", + "@vitest/snapshot": "1.3.0", + "@vitest/spy": "1.3.0", + "@vitest/utils": "1.3.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.2", + "vite": "^5.0.0", + "vite-node": "1.3.0", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.3.0", + "@vitest/ui": "1.3.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "dev": true, + "optional": true + }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", + "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", + "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", + "integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", + "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", + "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", + "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", + "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", + "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", + "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", + "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", + "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", + "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", + "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", + "dev": true, + "optional": true + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "@types/node": { + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } + }, + "@vitest/expect": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.0.tgz", + "integrity": "sha512-7bWt0vBTZj08B+Ikv70AnLRicohYwFgzNjFqo9SxxqHHxSlUJGSXmCRORhOnRMisiUryKMdvsi1n27Bc6jL9DQ==", + "dev": true, + "requires": { + "@vitest/spy": "1.3.0", + "@vitest/utils": "1.3.0", + "chai": "^4.3.10" + } + }, + "@vitest/runner": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.0.tgz", + "integrity": "sha512-1Jb15Vo/Oy7mwZ5bXi7zbgszsdIBNjc4IqP8Jpr/8RdBC4nF1CTzIAn2dxYvpF1nGSseeL39lfLQ2uvs5u1Y9A==", + "dev": true, + "requires": { + "@vitest/utils": "1.3.0", + "p-limit": "^5.0.0", + "pathe": "^1.1.1" + } + }, + "@vitest/snapshot": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.0.tgz", + "integrity": "sha512-swmktcviVVPYx9U4SEQXLV6AEY51Y6bZ14jA2yo6TgMxQ3h+ZYiO0YhAHGJNp0ohCFbPAis1R9kK0cvN6lDPQA==", + "dev": true, + "requires": { + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "pretty-format": "^29.7.0" + } + }, + "@vitest/spy": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.0.tgz", + "integrity": "sha512-AkCU0ThZunMvblDpPKgjIi025UxR8V7MZ/g/EwmAGpjIujLVV2X6rGYGmxE2D4FJbAy0/ijdROHMWa2M/6JVMw==", + "dev": true, + "requires": { + "tinyspy": "^2.2.0" + } + }, + "@vitest/utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.0.tgz", + "integrity": "sha512-/LibEY/fkaXQufi4GDlQZhikQsPO2entBKtfuyIpr1jV4DpaeasqkeHjhdOhU24vSHshcSuEyVlWdzvv2XmYCw==", + "dev": true, + "requires": { + "diff-sequences": "^29.6.3", + "estree-walker": "^3.0.3", + "loupe": "^2.3.7", + "pretty-format": "^29.7.0" + } + }, + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true + }, + "acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "dev": true + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "requires": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true + }, + "chai": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + } + }, + "check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "requires": { + "get-func-name": "^2.0.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0" + } + }, + "execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + } + }, + "follow-redirects": { + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true + }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, + "human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "js-tokens": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-8.0.3.tgz", + "integrity": "sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==", + "dev": true + }, + "jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true + }, + "local-pkg": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz", + "integrity": "sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==", + "dev": true, + "requires": { + "mlly": "^1.4.2", + "pkg-types": "^1.0.3" + } + }, + "loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "requires": { + "get-func-name": "^2.0.1" + } + }, + "magic-string": { + "version": "0.30.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", + "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "mlly": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.5.0.tgz", + "integrity": "sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==", + "dev": true, + "requires": { + "acorn": "^8.11.3", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "ufo": "^1.3.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true + }, + "npm-run-path": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + }, + "dependencies": { + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + } + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "p-limit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz", + "integrity": "sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==", + "dev": true, + "requires": { + "yocto-queue": "^1.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "requires": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, + "postcss": { + "version": "8.4.35", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", + "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "dev": true, + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "rollup": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", + "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.12.0", + "@rollup/rollup-android-arm64": "4.12.0", + "@rollup/rollup-darwin-arm64": "4.12.0", + "@rollup/rollup-darwin-x64": "4.12.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", + "@rollup/rollup-linux-arm64-gnu": "4.12.0", + "@rollup/rollup-linux-arm64-musl": "4.12.0", + "@rollup/rollup-linux-riscv64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-gnu": "4.12.0", + "@rollup/rollup-linux-x64-musl": "4.12.0", + "@rollup/rollup-win32-arm64-msvc": "4.12.0", + "@rollup/rollup-win32-ia32-msvc": "4.12.0", + "@rollup/rollup-win32-x64-msvc": "4.12.0", + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + }, + "strip-literal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.0.0.tgz", + "integrity": "sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==", + "dev": true, + "requires": { + "js-tokens": "^8.0.2" + } + }, + "tinybench": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.6.0.tgz", + "integrity": "sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==", + "dev": true + }, + "tinypool": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", + "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "dev": true + }, + "tinyspy": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz", + "integrity": "sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==", + "dev": true + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true + }, + "ufo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.4.0.tgz", + "integrity": "sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==", + "dev": true + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "vite": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.3.tgz", + "integrity": "sha512-UfmUD36DKkqhi/F75RrxvPpry+9+tTkrXfMNZD+SboZqBCMsxKtO52XeGzzuh7ioz+Eo/SYDBbdb0Z7vgcDJew==", + "dev": true, + "requires": { + "esbuild": "^0.19.3", + "fsevents": "~2.3.3", + "postcss": "^8.4.35", + "rollup": "^4.2.0" + } + }, + "vite-node": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.0.tgz", + "integrity": "sha512-D/oiDVBw75XMnjAXne/4feCkCEwcbr2SU1bjAhCcfI5Bq3VoOHji8/wCPAfUkDIeohJ5nSZ39fNxM3dNZ6OBOA==", + "dev": true, + "requires": { + "cac": "^6.7.14", + "debug": "^4.3.4", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^5.0.0" + } + }, + "vitest": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.0.tgz", + "integrity": "sha512-V9qb276J1jjSx9xb75T2VoYXdO1UKi+qfflY7V7w93jzX7oA/+RtYE6TcifxksxsZvygSSMwu2Uw6di7yqDMwg==", + "dev": true, + "requires": { + "@vitest/expect": "1.3.0", + "@vitest/runner": "1.3.0", + "@vitest/snapshot": "1.3.0", + "@vitest/spy": "1.3.0", + "@vitest/utils": "1.3.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.2", + "vite": "^5.0.0", + "vite-node": "1.3.0", + "why-is-node-running": "^2.2.2" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "requires": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + } + }, + "yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ed35453 --- /dev/null +++ b/package.json @@ -0,0 +1,46 @@ +{ + "name": "tremendous", + "version": "3.0.0", + "description": "A node.js client for the Tremendous API", + "keywords": [ + "tremendous", + "tremendous.com" + ], + "repository": { + "type": "git", + "url": "git://github.com/tremendous-rewards/tremendous-node.git" + }, + "bugs": { + "url": "http://github.com/tremendous-rewards/tremendous-node/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tremendous-rewards/tremendous-node/blob/main/LICENSE" + } + ], + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "build": "tsc --outDir dist/", + "test": "vitest --testTimeout 10000" + }, + "dependencies": { + "axios": "^1.6.1" + }, + "devDependencies": { + "@types/node": "^20.11.9", + "typescript": "^5.3.3", + "vitest": "^1.3.0" + }, + "homepage": "https://github.com/tremendous-rewards/tremendous-node#readme", + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "maintainers": [ + " " + ], + "author": "Tremendous Developers (https://www.tremendous.com)", + "license": "MIT" +} diff --git a/templates/typescript-axios/configuration.mustache b/templates/typescript-axios/configuration.mustache new file mode 100644 index 0000000..b36cea2 --- /dev/null +++ b/templates/typescript-axios/configuration.mustache @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +{{>licenseInfo}} + +// 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}`; + +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 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 = {}) { + 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. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/templates/typescript-axios/index.mustache b/templates/typescript-axios/index.mustache new file mode 100644 index 0000000..c6af58d --- /dev/null +++ b/templates/typescript-axios/index.mustache @@ -0,0 +1,8 @@ +/* tslint:disable */ +/* eslint-disable */ +{{>licenseInfo}} + +export * from "./api"; +export * from "./configuration"; +export * from "./environments"; +{{#withSeparateModelsAndApi}}export * from "./{{tsModelPackage}}";{{/withSeparateModelsAndApi}} diff --git a/test/campaigns.test.ts b/test/campaigns.test.ts new file mode 100644 index 0000000..e12f052 --- /dev/null +++ b/test/campaigns.test.ts @@ -0,0 +1,32 @@ +import { expect, test } from 'vitest'; +import { Configuration, Environments, CampaignsApi } from '../dist'; + +const CAMPAIGN_ID = process.env.TEST_CAMPAIGN_ID as string; + +const config = new Configuration({ + basePath: Environments.testflight, + accessToken: process.env.SANDBOX_API_TOKEN, +}); + +const api = new CampaignsApi(config); + +test("list campaigns", async () => { + const campaigns = await api.listCampaigns().then(({ data }) => data.campaigns); + + expect(campaigns.length).toBeGreaterThan(0); + + campaigns.forEach(campaign => { + expect(campaign).toHaveProperty("id"); + expect(campaign).toHaveProperty("name"); + expect(campaign).toHaveProperty("description"); + expect(campaign).toHaveProperty("products"); + }); +}); + +test("get a campaign", async () => { + const campaign = await api.getCampaign(CAMPAIGN_ID).then(({ data }) => data.campaign); + + expect(campaign.id).toEqual(CAMPAIGN_ID); + expect(campaign.products).toHaveLength(3); + expect(campaign.name).toEqual("Default Campaign") +}); diff --git a/test/invoices.test.ts b/test/invoices.test.ts new file mode 100644 index 0000000..91a6557 --- /dev/null +++ b/test/invoices.test.ts @@ -0,0 +1,22 @@ +import { expect, test } from 'vitest'; +import { Configuration, Environments, InvoicesApi } from '../dist'; + +const config = new Configuration({ + basePath: Environments.testflight, + accessToken: process.env.SANDBOX_API_TOKEN, +}); + +const api = new InvoicesApi(config); + +test("list invoices", async () => { + const invoices = await api.listInvoices().then(({ data }) => data.invoices); + + expect(invoices.length).toBeGreaterThan(0); + + invoices.forEach(invoice => { + expect(invoice).toHaveProperty("id"); + expect(invoice).toHaveProperty("po_number"); + expect(invoice).toHaveProperty("amount"); + expect(invoice).toHaveProperty("created_at"); + }); +}); diff --git a/test/members.test.ts b/test/members.test.ts new file mode 100644 index 0000000..07cc55f --- /dev/null +++ b/test/members.test.ts @@ -0,0 +1,22 @@ +import { expect, test } from 'vitest'; +import { Configuration, Environments, MembersApi } from '../dist'; + +const config = new Configuration({ + basePath: Environments.testflight, + accessToken: process.env.SANDBOX_API_TOKEN, +}); + +const api = new MembersApi(config); + +test("list members", async () => { + const members = await api.listMembers().then(({ data }) => data.members); + + expect(members.length).toBeGreaterThan(0); + + members.slice(0, 10).forEach(member => { + expect(member).toHaveProperty("id"); + expect(member).toHaveProperty("email"); + expect(member).toHaveProperty("name"); + expect(member).toHaveProperty("role"); + }); +}); diff --git a/test/orders.test.ts b/test/orders.test.ts new file mode 100644 index 0000000..06f61f6 --- /dev/null +++ b/test/orders.test.ts @@ -0,0 +1,63 @@ +import { expect, test } from 'vitest'; +import { Configuration, Environments, OrdersApi, CreateOrderRequest } from '../dist'; + +const CAMPAIGN_ID = process.env.TEST_CAMPAIGN_ID as string; +const RECIPIENT_EMAIL = process.env.TEST_RECIPIENT_EMAIL as string; + +const config = new Configuration({ + basePath: Environments.testflight, + accessToken: process.env.SANDBOX_API_TOKEN, +}); + +const api = new OrdersApi(config); + +test("list orders", async () => { + const orders = await api.listOrders().then(({ data }) => data.orders); + + expect(orders.length).toBeGreaterThan(0); + + orders.forEach(order => { + expect(order).toHaveProperty("id"); + expect(order).toHaveProperty("created_at"); + expect(order).toHaveProperty("payment"); + }); +}); + +test("submit an order with a campaign", async () => { + const params: CreateOrderRequest = { + payment: { + funding_source_id: "balance", + }, + reward: + { + delivery: { + method: "EMAIL" + }, + recipient: { + name: "Recipient Name", + email: RECIPIENT_EMAIL + }, + value: { + denomination: 5.0, + currency_code: "USD", + }, + campaign_id: CAMPAIGN_ID, + } + }; + + const { data } = await api.createOrder(params); + expect(data.order).toHaveProperty("id"); + expect(data.order.campaign_id).toEqual(CAMPAIGN_ID); +}); + + +test("raise validation errors", async () => { + try { + await api.createOrder({ payment: { funding_source_id: "WRONG ID" }, reward: {}}); + } catch(error) { + const { status, data } = error.response; + expect(status).toEqual(422); + expect(data.errors).toHaveProperty("payload"); + expect(data.errors).toHaveProperty("message"); + } +}); diff --git a/test/products.test.ts b/test/products.test.ts new file mode 100644 index 0000000..c18d6a4 --- /dev/null +++ b/test/products.test.ts @@ -0,0 +1,31 @@ +import { expect, test } from 'vitest'; +import { Configuration, Environments, ProductsApi } from '../dist'; + +const PRODUCT_ID = process.env.TEST_PRODUCT_ID as string; + +const config = new Configuration({ + basePath: Environments.testflight, + accessToken: process.env.SANDBOX_API_TOKEN, +}); + +const api = new ProductsApi(config); + +test("list products", async () => { + const products = await api.listProducts().then(({ data }) => data.products); + + expect(products.length).toBeGreaterThan(0); + + products.slice(0, 10).forEach(product => { + expect(product).toHaveProperty("id"); + expect(product).toHaveProperty("name"); + expect(product).toHaveProperty("currency_codes"); + }); +}); + +test("get a product", async () => { + const product = await api.getProduct(PRODUCT_ID).then(({ data }) => data.product); + + expect(product.id).toEqual(PRODUCT_ID); + expect(product).toHaveProperty("name"); + expect(product).toHaveProperty("currency_codes"); +}); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..a7f109d --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "declaration": true, + "target": "ES6", + "module": "commonjs", + "noImplicitAny": true, + "outDir": "dist", + "rootDir": ".", + "moduleResolution": "node", + "typeRoots": [ + "node_modules/@types" + ] + }, + "exclude": [ + "dist", + "test", + "node_modules" + ] +}