/** * 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 { ResourceAttributeCreate } from '../types'; import { ResourceAttributeRead } from '../types'; import { ResourceAttributeUpdate } from '../types'; /** * UserAttributesApi - axios parameter creator * @export */ export declare const UserAttributesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new attribute for the User resource. * @summary Create User Attribute * @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 {ResourceAttributeCreate} resourceAttributeCreate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUserAttribute: (projId: string, envId: string, resourceAttributeCreate: ResourceAttributeCreate, resourceId?: string, options?: AxiosRequestConfig) => Promise; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @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} */ deleteUserAttribute: (projId: string, envId: string, attributeId: string, resourceId?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUserAttribute: (projId: string, envId: string, attributeId: string, resourceId?: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the attributes defined on the User resource. * @summary List User Attributes * @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] * @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} */ listUserAttributes: (projId: string, envId: string, resourceId?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateUserAttribute: (projId: string, envId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, resourceId?: string, options?: AxiosRequestConfig) => Promise; }; /** * UserAttributesApi - functional programming interface * @export */ export declare const UserAttributesApiFp: (configuration?: Configuration) => { /** * Creates a new attribute for the User resource. * @summary Create User Attribute * @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 {ResourceAttributeCreate} resourceAttributeCreate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUserAttribute(projId: string, envId: string, resourceAttributeCreate: ResourceAttributeCreate, resourceId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @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} */ deleteUserAttribute(projId: string, envId: string, attributeId: string, resourceId?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUserAttribute(projId: string, envId: string, attributeId: string, resourceId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the attributes defined on the User resource. * @summary List User Attributes * @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] * @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} */ listUserAttributes(projId: string, envId: string, resourceId?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateUserAttribute(projId: string, envId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, resourceId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * UserAttributesApi - factory interface * @export */ export declare const UserAttributesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new attribute for the User resource. * @summary Create User Attribute * @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 {ResourceAttributeCreate} resourceAttributeCreate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createUserAttribute(projId: string, envId: string, resourceAttributeCreate: ResourceAttributeCreate, resourceId?: string, options?: any): AxiosPromise; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @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} */ deleteUserAttribute(projId: string, envId: string, attributeId: string, resourceId?: string, page?: number, perPage?: number, options?: any): AxiosPromise; /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getUserAttribute(projId: string, envId: string, attributeId: string, resourceId?: string, options?: any): AxiosPromise; /** * Lists all the attributes defined on the User resource. * @summary List User Attributes * @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] * @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} */ listUserAttributes(projId: string, envId: string, resourceId?: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute * @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} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {string} [resourceId] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateUserAttribute(projId: string, envId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, resourceId?: string, options?: any): AxiosPromise; }; /** * Request parameters for createUserAttribute operation in UserAttributesApi. * @export * @interface UserAttributesApiCreateUserAttributeRequest */ export interface UserAttributesApiCreateUserAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiCreateUserAttribute */ 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 UserAttributesApiCreateUserAttribute */ readonly envId: string; /** * * @type {ResourceAttributeCreate} * @memberof UserAttributesApiCreateUserAttribute */ readonly resourceAttributeCreate: ResourceAttributeCreate; /** * * @type {string} * @memberof UserAttributesApiCreateUserAttribute */ readonly resourceId?: string; } /** * Request parameters for deleteUserAttribute operation in UserAttributesApi. * @export * @interface UserAttributesApiDeleteUserAttributeRequest */ export interface UserAttributesApiDeleteUserAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiDeleteUserAttribute */ 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 UserAttributesApiDeleteUserAttribute */ readonly envId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiDeleteUserAttribute */ readonly attributeId: string; /** * * @type {string} * @memberof UserAttributesApiDeleteUserAttribute */ readonly resourceId?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof UserAttributesApiDeleteUserAttribute */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof UserAttributesApiDeleteUserAttribute */ readonly perPage?: number; } /** * Request parameters for getUserAttribute operation in UserAttributesApi. * @export * @interface UserAttributesApiGetUserAttributeRequest */ export interface UserAttributesApiGetUserAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiGetUserAttribute */ 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 UserAttributesApiGetUserAttribute */ readonly envId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiGetUserAttribute */ readonly attributeId: string; /** * * @type {string} * @memberof UserAttributesApiGetUserAttribute */ readonly resourceId?: string; } /** * Request parameters for listUserAttributes operation in UserAttributesApi. * @export * @interface UserAttributesApiListUserAttributesRequest */ export interface UserAttributesApiListUserAttributesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiListUserAttributes */ 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 UserAttributesApiListUserAttributes */ readonly envId: string; /** * * @type {string} * @memberof UserAttributesApiListUserAttributes */ readonly resourceId?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof UserAttributesApiListUserAttributes */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof UserAttributesApiListUserAttributes */ readonly perPage?: number; } /** * Request parameters for updateUserAttribute operation in UserAttributesApi. * @export * @interface UserAttributesApiUpdateUserAttributeRequest */ export interface UserAttributesApiUpdateUserAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiUpdateUserAttribute */ 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 UserAttributesApiUpdateUserAttribute */ readonly envId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof UserAttributesApiUpdateUserAttribute */ readonly attributeId: string; /** * * @type {ResourceAttributeUpdate} * @memberof UserAttributesApiUpdateUserAttribute */ readonly resourceAttributeUpdate: ResourceAttributeUpdate; /** * * @type {string} * @memberof UserAttributesApiUpdateUserAttribute */ readonly resourceId?: string; } /** * UserAttributesApi - object-oriented interface * @export * @class UserAttributesApi * @extends {BaseAPI} */ export declare class UserAttributesApi extends BaseAPI { /** * Creates a new attribute for the User resource. * @summary Create User Attribute * @param {UserAttributesApiCreateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserAttributesApi */ createUserAttribute(requestParameters: UserAttributesApiCreateUserAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete User Attribute * @param {UserAttributesApiDeleteUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserAttributesApi */ deleteUserAttribute(requestParameters: UserAttributesApiDeleteUserAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single attribute defined on the User resource, if such attribute exists. * @summary Get User Attribute * @param {UserAttributesApiGetUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserAttributesApi */ getUserAttribute(requestParameters: UserAttributesApiGetUserAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the attributes defined on the User resource. * @summary List User Attributes * @param {UserAttributesApiListUserAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserAttributesApi */ listUserAttributes(requestParameters: UserAttributesApiListUserAttributesRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates the attribute defined on the User resource. Fields that will be provided will be completely overwritten. * @summary Update User Attribute * @param {UserAttributesApiUpdateUserAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserAttributesApi */ updateUserAttribute(requestParameters: UserAttributesApiUpdateUserAttributeRequest, options?: AxiosRequestConfig): Promise>; }