/** * Permit.io API * Authorization as a service * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { RelationCreate } from '../types'; import { RelationRead } from '../types'; /** * ResourceRelationsApi - axios parameter creator * @export */ export declare const ResourceRelationsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a resource relation to another resource * @summary Create Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {RelationCreate} relationCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceRelation: (projId: string, envId: string, resourceId: string, relationCreate: RelationCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes a resource relation * @summary Delete Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceRelation: (projId: string, envId: string, resourceId: string, relationId: string, options?: AxiosRequestConfig) => Promise; /** * Get a resource relation * @summary Get Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceRelation: (projId: string, envId: string, resourceId: string, relationId: string, options?: AxiosRequestConfig) => Promise; /** * Creates a resource relation to another resource * @summary List Resource Relations * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceRelations: (projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; }; /** * ResourceRelationsApi - functional programming interface * @export */ export declare const ResourceRelationsApiFp: (configuration?: Configuration) => { /** * Creates a resource relation to another resource * @summary Create Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {RelationCreate} relationCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceRelation(projId: string, envId: string, resourceId: string, relationCreate: RelationCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes a resource relation * @summary Delete Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceRelation(projId: string, envId: string, resourceId: string, relationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Get a resource relation * @summary Get Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceRelation(projId: string, envId: string, resourceId: string, relationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates a resource relation to another resource * @summary List Resource Relations * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceRelations(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; }; /** * ResourceRelationsApi - factory interface * @export */ export declare const ResourceRelationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a resource relation to another resource * @summary Create Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {RelationCreate} relationCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceRelation(projId: string, envId: string, resourceId: string, relationCreate: RelationCreate, options?: any): AxiosPromise; /** * Deletes a resource relation * @summary Delete Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceRelation(projId: string, envId: string, resourceId: string, relationId: string, options?: any): AxiosPromise; /** * Get a resource relation * @summary Get Resource Relation * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} relationId Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceRelation(projId: string, envId: string, resourceId: string, relationId: string, options?: any): AxiosPromise; /** * Creates a resource relation to another resource * @summary List Resource Relations * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceRelations(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; }; /** * Request parameters for createResourceRelation operation in ResourceRelationsApi. * @export * @interface ResourceRelationsApiCreateResourceRelationRequest */ export interface ResourceRelationsApiCreateResourceRelationRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiCreateResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiCreateResourceRelation */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiCreateResourceRelation */ readonly resourceId: string; /** * * @type {RelationCreate} * @memberof ResourceRelationsApiCreateResourceRelation */ readonly relationCreate: RelationCreate; } /** * Request parameters for deleteResourceRelation operation in ResourceRelationsApi. * @export * @interface ResourceRelationsApiDeleteResourceRelationRequest */ export interface ResourceRelationsApiDeleteResourceRelationRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly resourceId: string; /** * Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiDeleteResourceRelation */ readonly relationId: string; } /** * Request parameters for getResourceRelation operation in ResourceRelationsApi. * @export * @interface ResourceRelationsApiGetResourceRelationRequest */ export interface ResourceRelationsApiGetResourceRelationRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiGetResourceRelation */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiGetResourceRelation */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiGetResourceRelation */ readonly resourceId: string; /** * Either the unique id of the relation, or the URL-friendly key of the relation (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiGetResourceRelation */ readonly relationId: string; } /** * Request parameters for listResourceRelations operation in ResourceRelationsApi. * @export * @interface ResourceRelationsApiListResourceRelationsRequest */ export interface ResourceRelationsApiListResourceRelationsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiListResourceRelations */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiListResourceRelations */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceRelationsApiListResourceRelations */ readonly resourceId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ResourceRelationsApiListResourceRelations */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ResourceRelationsApiListResourceRelations */ readonly perPage?: number; } /** * ResourceRelationsApi - object-oriented interface * @export * @class ResourceRelationsApi * @extends {BaseAPI} */ export declare class ResourceRelationsApi extends BaseAPI { /** * Creates a resource relation to another resource * @summary Create Resource Relation * @param {ResourceRelationsApiCreateResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceRelationsApi */ createResourceRelation(requestParameters: ResourceRelationsApiCreateResourceRelationRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes a resource relation * @summary Delete Resource Relation * @param {ResourceRelationsApiDeleteResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceRelationsApi */ deleteResourceRelation(requestParameters: ResourceRelationsApiDeleteResourceRelationRequest, options?: AxiosRequestConfig): Promise>; /** * Get a resource relation * @summary Get Resource Relation * @param {ResourceRelationsApiGetResourceRelationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceRelationsApi */ getResourceRelation(requestParameters: ResourceRelationsApiGetResourceRelationRequest, options?: AxiosRequestConfig): Promise>; /** * Creates a resource relation to another resource * @summary List Resource Relations * @param {ResourceRelationsApiListResourceRelationsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceRelationsApi */ listResourceRelations(requestParameters: ResourceRelationsApiListResourceRelationsRequest, options?: AxiosRequestConfig): Promise>; }