UNPKG

@getgreenspark/impacts

Version:
215 lines (214 loc) 10.4 kB
/** * Impact * Here you can find documentation and examples for Greenspark Impact API * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { BatchImpactPurchaseResponses } from '../models'; import { CreateImpactBatchRequestBody } from '../models'; import { ImpactDto } from '../models'; import { ImpactPurchaseDetail } from '../models'; import { TransactionPurchase } from '../models'; /** * ImpactsApi - axios parameter creator * @export */ export declare const ImpactsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates an impact associated with a source and a trigger. * @summary Create Impact * @param {ImpactDto} body * @param {string} sourceId The id of the source associated with the impact. * @param {string} triggerId The id of the trigger associated with the impact. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpact: (body: ImpactDto, sourceId: string, triggerId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Run multiple create impact call in a batch, equivalent to calling create impact multiple times with different parameters. * @summary Create Impact in Batch * @param {CreateImpactBatchRequestBody} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpactBatch: (body: CreateImpactBatchRequestBody, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Creates an impact associated with an account id. * @summary Create Tailored Impact * @param {ImpactDto} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTailoredImpact: (body: ImpactDto, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Fetch a single impact purchase. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchase * @param {string} purchaseId The id of the purchase. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchase: (purchaseId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Fetch all impact purchases. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchases * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchases: (options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * ImpactsApi - functional programming interface * @export */ export declare const ImpactsApiFp: (configuration?: Configuration) => { /** * Creates an impact associated with a source and a trigger. * @summary Create Impact * @param {ImpactDto} body * @param {string} sourceId The id of the source associated with the impact. * @param {string} triggerId The id of the trigger associated with the impact. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpact(body: ImpactDto, sourceId: string, triggerId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>>; /** * Run multiple create impact call in a batch, equivalent to calling create impact multiple times with different parameters. * @summary Create Impact in Batch * @param {CreateImpactBatchRequestBody} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpactBatch(body: CreateImpactBatchRequestBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<BatchImpactPurchaseResponses>>>; /** * Creates an impact associated with an account id. * @summary Create Tailored Impact * @param {ImpactDto} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTailoredImpact(body: ImpactDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>>; /** * Fetch a single impact purchase. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchase * @param {string} purchaseId The id of the purchase. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchase(purchaseId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<TransactionPurchase>>>; /** * Fetch all impact purchases. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchases * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchases(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<TransactionPurchase>>>>; }; /** * ImpactsApi - factory interface * @export */ export declare const ImpactsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates an impact associated with a source and a trigger. * @summary Create Impact * @param {ImpactDto} body * @param {string} sourceId The id of the source associated with the impact. * @param {string} triggerId The id of the trigger associated with the impact. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpact(body: ImpactDto, sourceId: string, triggerId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>; /** * Run multiple create impact call in a batch, equivalent to calling create impact multiple times with different parameters. * @summary Create Impact in Batch * @param {CreateImpactBatchRequestBody} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createImpactBatch(body: CreateImpactBatchRequestBody, options?: AxiosRequestConfig): Promise<AxiosResponse<BatchImpactPurchaseResponses>>; /** * Creates an impact associated with an account id. * @summary Create Tailored Impact * @param {ImpactDto} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTailoredImpact(body: ImpactDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>; /** * Fetch a single impact purchase. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchase * @param {string} purchaseId The id of the purchase. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchase(purchaseId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<TransactionPurchase>>; /** * Fetch all impact purchases. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchases * @param {*} [options] Override http request option. * @throws {RequiredError} */ getImpactPurchases(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<TransactionPurchase>>>; }; /** * ImpactsApi - object-oriented interface * @export * @class ImpactsApi * @extends {BaseAPI} */ export declare class ImpactsApi extends BaseAPI { /** * Creates an impact associated with a source and a trigger. * @summary Create Impact * @param {ImpactDto} body * @param {string} sourceId The id of the source associated with the impact. * @param {string} triggerId The id of the trigger associated with the impact. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ImpactsApi */ createImpact(body: ImpactDto, sourceId: string, triggerId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>; /** * Run multiple create impact call in a batch, equivalent to calling create impact multiple times with different parameters. * @summary Create Impact in Batch * @param {CreateImpactBatchRequestBody} body * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ImpactsApi */ createImpactBatch(body: CreateImpactBatchRequestBody, options?: AxiosRequestConfig): Promise<AxiosResponse<BatchImpactPurchaseResponses>>; /** * Creates an impact associated with an account id. * @summary Create Tailored Impact * @param {ImpactDto} body * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ImpactsApi */ createTailoredImpact(body: ImpactDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ImpactPurchaseDetail>>>; /** * Fetch a single impact purchase. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchase * @param {string} purchaseId The id of the purchase. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ImpactsApi */ getImpactPurchase(purchaseId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<TransactionPurchase>>; /** * Fetch all impact purchases. [Read more about the domain object here.](https://greenspark.readme.io/reference/impacts) * @summary Fetch Impact Purchases * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ImpactsApi */ getImpactPurchases(options?: AxiosRequestConfig): Promise<AxiosResponse<Array<TransactionPurchase>>>; }