/** * Ory Keto API * Documentation for all of Ory Keto\'s REST APIs. gRPC is documented separately. * * The version of the OpenAPI document: v26.2.0 * Contact: hi@ory.sh * * 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'; /** * Batch Check Permission Body */ export interface BatchCheckPermissionBody { 'tuples'?: Array; } /** * Batch Check Permission Result */ export interface BatchCheckPermissionResult { /** * An array of check results. The order aligns with the input order. */ 'results': Array; } export interface CheckOplSyntaxResult { /** * The list of syntax errors */ 'errors'?: Array; } /** * The content of the allowed field is mirrored in the HTTP status code. */ export interface CheckPermissionResult { /** * whether the relation tuple is allowed */ 'allowed': boolean; } /** * Check Permission Result With Error */ export interface CheckPermissionResultWithError { /** * whether the relation tuple is allowed */ 'allowed': boolean; /** * any error generated while checking the relation tuple */ 'error'?: string; } /** * Create Relationship Request Body */ export interface CreateRelationshipBody { /** * Namespace to query */ 'namespace'?: string; /** * Object to query */ 'object'?: string; /** * Relation to query */ 'relation'?: string; /** * SubjectID to query Either SubjectSet or SubjectID can be provided. */ 'subject_id'?: string; 'subject_set'?: SubjectSet; } /** * The standard Ory JSON API error format. */ export interface ErrorGeneric { 'error': GenericError; } export interface ExpandedPermissionTree { /** * The children of the node, possibly none. */ 'children'?: Array; 'tuple'?: Relationship; /** * The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified */ 'type': ExpandedPermissionTreeTypeEnum; } export declare const ExpandedPermissionTreeTypeEnum: { readonly Union: "union"; readonly Exclusion: "exclusion"; readonly Intersection: "intersection"; readonly Leaf: "leaf"; readonly TupleToSubjectSet: "tuple_to_subject_set"; readonly ComputedSubjectSet: "computed_subject_set"; readonly Not: "not"; readonly Unspecified: "unspecified"; readonly UnknownDefaultOpenApi: "11184809"; }; export type ExpandedPermissionTreeTypeEnum = typeof ExpandedPermissionTreeTypeEnum[keyof typeof ExpandedPermissionTreeTypeEnum]; export interface GenericError { /** * The status code */ 'code'?: number; /** * Debug information This field is often not exposed to protect against leaking sensitive information. */ 'debug'?: string; /** * Further error details */ 'details'?: { [key: string]: any; }; /** * The error ID Useful when trying to identify various errors in application logic. */ 'id'?: string; /** * Error message The error\'s message. */ 'message': string; /** * A human-readable reason for the error */ 'reason'?: string; /** * The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. */ 'request'?: string; /** * The status description */ 'status'?: string; } export interface GetVersion200Response { /** * The version of Ory Keto. */ 'version': string; } export interface HealthNotReadyStatus { /** * Errors contains a list of errors that caused the not ready status. */ 'errors'?: { [key: string]: string; }; } export interface HealthStatus { /** * Status always contains \"ok\". */ 'status'?: string; } export interface IsAlive200Response { /** * Always \"ok\". */ 'status': string; } export interface IsReady503Response { /** * Errors contains a list of errors that caused the not ready status. */ 'errors': { [key: string]: string; }; } export interface Namespace { /** * Name of the namespace. */ 'name'?: string; } export interface ParseError { 'end'?: SourcePosition; 'message'?: string; 'start'?: SourcePosition; } /** * Check Permission using Post Request Body */ export interface PostCheckPermissionBody { /** * Namespace to query */ 'namespace'?: string; /** * Object to query */ 'object'?: string; /** * Relation to query */ 'relation'?: string; /** * SubjectID to query Either SubjectSet or SubjectID can be provided. */ 'subject_id'?: string; 'subject_set'?: SubjectSet; } /** * Post Check Permission Or Error Body */ export interface PostCheckPermissionOrErrorBody { /** * Namespace to query */ 'namespace'?: string; /** * Object to query */ 'object'?: string; /** * Relation to query */ 'relation'?: string; /** * SubjectID to query Either SubjectSet or SubjectID can be provided. */ 'subject_id'?: string; 'subject_set'?: SubjectSet; } /** * Relation Query */ export interface RelationQuery { /** * Namespace to query */ 'namespace'?: string; /** * Object to query */ 'object'?: string; /** * Relation to query */ 'relation'?: string; /** * SubjectID to query Either SubjectSet or SubjectID can be provided. */ 'subject_id'?: string; 'subject_set'?: SubjectSet; } /** * Relationship */ export interface Relationship { /** * Namespace of the Relation Tuple */ 'namespace': string; /** * Object of the Relation Tuple */ 'object': string; /** * Relation of the Relation Tuple */ 'relation': string; /** * SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided. */ 'subject_id'?: string; 'subject_set'?: SubjectSet; } /** * Relationship Namespace List */ export interface RelationshipNamespaces { 'namespaces'?: Array; } /** * Payload for patching a relationship */ export interface RelationshipPatch { 'action'?: RelationshipPatchActionEnum; 'relation_tuple'?: Relationship; } export declare const RelationshipPatchActionEnum: { readonly Insert: "insert"; readonly Delete: "delete"; readonly UnknownDefaultOpenApi: "11184809"; }; export type RelationshipPatchActionEnum = typeof RelationshipPatchActionEnum[keyof typeof RelationshipPatchActionEnum]; /** * Paginated Relationship List */ export interface Relationships { /** * The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page. */ 'next_page_token'?: string; 'relation_tuples'?: Array; } export interface SourcePosition { 'Line'?: number; 'column'?: number; } export interface SubjectSet { /** * Namespace of the Subject Set */ 'namespace': string; /** * Object of the Subject Set */ 'object': string; /** * Relation of the Subject Set */ 'relation': string; } export interface Version { /** * Version is the service\'s version. */ 'version'?: string; } /** * MetadataApi - axios parameter creator */ export declare const MetadataApiAxiosParamCreator: (configuration?: Configuration) => { /** * This endpoint returns the version of Ory Keto. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion: (options?: RawAxiosRequestConfig) => Promise; /** * This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive: (options?: RawAxiosRequestConfig) => Promise; /** * This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Keto, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady: (options?: RawAxiosRequestConfig) => Promise; }; /** * MetadataApi - functional programming interface */ export declare const MetadataApiFp: (configuration?: Configuration) => { /** * This endpoint returns the version of Ory Keto. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Keto, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * MetadataApi - factory interface */ export declare const MetadataApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * This endpoint returns the version of Ory Keto. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion(options?: RawAxiosRequestConfig): AxiosPromise; /** * This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive(options?: RawAxiosRequestConfig): AxiosPromise; /** * This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Keto, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady(options?: RawAxiosRequestConfig): AxiosPromise; }; /** * MetadataApi - object-oriented interface */ export declare class MetadataApi extends BaseAPI { /** * This endpoint returns the version of Ory Keto. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance. * @summary Return Running Software Version. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getVersion(options?: RawAxiosRequestConfig): Promise>; /** * This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isAlive(options?: RawAxiosRequestConfig): Promise>; /** * This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Keto, the health status will never refer to the cluster state, only to a single instance. * @summary Check HTTP Server and Database Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ isReady(options?: RawAxiosRequestConfig): Promise>; } /** * PermissionApi - axios parameter creator */ export declare const PermissionApiAxiosParamCreator: (configuration?: Configuration) => { /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Batch check permissions * @param {number} [maxDepth] * @param {BatchCheckPermissionBody} [batchCheckPermissionBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCheckPermission: (maxDepth?: number, batchCheckPermissionBody?: BatchCheckPermissionBody, options?: RawAxiosRequestConfig) => Promise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermission: (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig) => Promise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermissionOrError: (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig) => Promise; /** * Use this endpoint to expand a relationship tuple into permissions. * @summary Expand a Relationship into permissions. * @param {string} namespace Namespace of the Subject Set * @param {string} object Object of the Subject Set * @param {string} relation Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ expandPermissions: (namespace: string, object: string, relation: string, maxDepth?: number, options?: RawAxiosRequestConfig) => Promise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {number} [maxDepth] * @param {PostCheckPermissionBody} [postCheckPermissionBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermission: (maxDepth?: number, postCheckPermissionBody?: PostCheckPermissionBody, options?: RawAxiosRequestConfig) => Promise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {number} [maxDepth] * @param {PostCheckPermissionOrErrorBody} [postCheckPermissionOrErrorBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermissionOrError: (maxDepth?: number, postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody, options?: RawAxiosRequestConfig) => Promise; }; /** * PermissionApi - functional programming interface */ export declare const PermissionApiFp: (configuration?: Configuration) => { /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Batch check permissions * @param {number} [maxDepth] * @param {BatchCheckPermissionBody} [batchCheckPermissionBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCheckPermission(maxDepth?: number, batchCheckPermissionBody?: BatchCheckPermissionBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermission(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermissionOrError(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this endpoint to expand a relationship tuple into permissions. * @summary Expand a Relationship into permissions. * @param {string} namespace Namespace of the Subject Set * @param {string} object Object of the Subject Set * @param {string} relation Relation of the Subject Set * @param {number} [maxDepth] * @param {*} [options] Override http request option. * @throws {RequiredError} */ expandPermissions(namespace: string, object: string, relation: string, maxDepth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {number} [maxDepth] * @param {PostCheckPermissionBody} [postCheckPermissionBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermission(maxDepth?: number, postCheckPermissionBody?: PostCheckPermissionBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {number} [maxDepth] * @param {PostCheckPermissionOrErrorBody} [postCheckPermissionOrErrorBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermissionOrError(maxDepth?: number, postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * PermissionApi - factory interface */ export declare const PermissionApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Batch check permissions * @param {PermissionApiBatchCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCheckPermission(requestParameters?: PermissionApiBatchCheckPermissionRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermission(requestParameters?: PermissionApiCheckPermissionRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiCheckPermissionOrErrorRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermissionOrError(requestParameters?: PermissionApiCheckPermissionOrErrorRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Use this endpoint to expand a relationship tuple into permissions. * @summary Expand a Relationship into permissions. * @param {PermissionApiExpandPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ expandPermissions(requestParameters: PermissionApiExpandPermissionsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiPostCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermission(requestParameters?: PermissionApiPostCheckPermissionRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiPostCheckPermissionOrErrorRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermissionOrError(requestParameters?: PermissionApiPostCheckPermissionOrErrorRequest, options?: RawAxiosRequestConfig): AxiosPromise; }; /** * Request parameters for batchCheckPermission operation in PermissionApi. */ export interface PermissionApiBatchCheckPermissionRequest { readonly maxDepth?: number; readonly batchCheckPermissionBody?: BatchCheckPermissionBody; } /** * Request parameters for checkPermission operation in PermissionApi. */ export interface PermissionApiCheckPermissionRequest { /** * Namespace of the Relationship */ readonly namespace?: string; /** * Object of the Relationship */ readonly object?: string; /** * Relation of the Relationship */ readonly relation?: string; /** * SubjectID of the Relationship */ readonly subjectId?: string; /** * Namespace of the Subject Set */ readonly subjectSetNamespace?: string; /** * Object of the Subject Set */ readonly subjectSetObject?: string; /** * Relation of the Subject Set */ readonly subjectSetRelation?: string; readonly maxDepth?: number; } /** * Request parameters for checkPermissionOrError operation in PermissionApi. */ export interface PermissionApiCheckPermissionOrErrorRequest { /** * Namespace of the Relationship */ readonly namespace?: string; /** * Object of the Relationship */ readonly object?: string; /** * Relation of the Relationship */ readonly relation?: string; /** * SubjectID of the Relationship */ readonly subjectId?: string; /** * Namespace of the Subject Set */ readonly subjectSetNamespace?: string; /** * Object of the Subject Set */ readonly subjectSetObject?: string; /** * Relation of the Subject Set */ readonly subjectSetRelation?: string; readonly maxDepth?: number; } /** * Request parameters for expandPermissions operation in PermissionApi. */ export interface PermissionApiExpandPermissionsRequest { /** * Namespace of the Subject Set */ readonly namespace: string; /** * Object of the Subject Set */ readonly object: string; /** * Relation of the Subject Set */ readonly relation: string; readonly maxDepth?: number; } /** * Request parameters for postCheckPermission operation in PermissionApi. */ export interface PermissionApiPostCheckPermissionRequest { readonly maxDepth?: number; readonly postCheckPermissionBody?: PostCheckPermissionBody; } /** * Request parameters for postCheckPermissionOrError operation in PermissionApi. */ export interface PermissionApiPostCheckPermissionOrErrorRequest { readonly maxDepth?: number; readonly postCheckPermissionOrErrorBody?: PostCheckPermissionOrErrorBody; } /** * PermissionApi - object-oriented interface */ export declare class PermissionApi extends BaseAPI { /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Batch check permissions * @param {PermissionApiBatchCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCheckPermission(requestParameters?: PermissionApiBatchCheckPermissionRequest, options?: RawAxiosRequestConfig): Promise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermission(requestParameters?: PermissionApiCheckPermissionRequest, options?: RawAxiosRequestConfig): Promise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiCheckPermissionOrErrorRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkPermissionOrError(requestParameters?: PermissionApiCheckPermissionOrErrorRequest, options?: RawAxiosRequestConfig): Promise>; /** * Use this endpoint to expand a relationship tuple into permissions. * @summary Expand a Relationship into permissions. * @param {PermissionApiExpandPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ expandPermissions(requestParameters: PermissionApiExpandPermissionsRequest, options?: RawAxiosRequestConfig): Promise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiPostCheckPermissionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermission(requestParameters?: PermissionApiPostCheckPermissionRequest, options?: RawAxiosRequestConfig): Promise>; /** * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). * @summary Check a permission * @param {PermissionApiPostCheckPermissionOrErrorRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ postCheckPermissionOrError(requestParameters?: PermissionApiPostCheckPermissionOrErrorRequest, options?: RawAxiosRequestConfig): Promise>; } /** * RelationshipApi - axios parameter creator */ export declare const RelationshipApiAxiosParamCreator: (configuration?: Configuration) => { /** * The OPL file is expected in the body of the request. * @summary Check the syntax of an OPL file * @param {string} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkOplSyntax: (body?: string, options?: RawAxiosRequestConfig) => Promise; /** * Use this endpoint to create a relationship. * @summary Create a Relationship * @param {CreateRelationshipBody} [createRelationshipBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRelationship: (createRelationshipBody?: CreateRelationshipBody, options?: RawAxiosRequestConfig) => Promise; /** * Use this endpoint to delete relationships * @summary Delete Relationships * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRelationships: (namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig) => Promise; /** * Get all relationships that match the query. Only the namespace field is required. * @summary Query relationships * @param {number} [pageSize] Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRelationships: (pageSize?: number, pageToken?: string, namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig) => Promise; /** * Get all namespaces * @summary Query namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRelationshipNamespaces: (options?: RawAxiosRequestConfig) => Promise; /** * Use this endpoint to patch one or more relationships. * @summary Patch Multiple Relationships * @param {Array} [relationshipPatch] * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchRelationships: (relationshipPatch?: Array, options?: RawAxiosRequestConfig) => Promise; }; /** * RelationshipApi - functional programming interface */ export declare const RelationshipApiFp: (configuration?: Configuration) => { /** * The OPL file is expected in the body of the request. * @summary Check the syntax of an OPL file * @param {string} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkOplSyntax(body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this endpoint to create a relationship. * @summary Create a Relationship * @param {CreateRelationshipBody} [createRelationshipBody] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRelationship(createRelationshipBody?: CreateRelationshipBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this endpoint to delete relationships * @summary Delete Relationships * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRelationships(namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Get all relationships that match the query. Only the namespace field is required. * @summary Query relationships * @param {number} [pageSize] Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [pageToken] Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). * @param {string} [namespace] Namespace of the Relationship * @param {string} [object] Object of the Relationship * @param {string} [relation] Relation of the Relationship * @param {string} [subjectId] SubjectID of the Relationship * @param {string} [subjectSetNamespace] Namespace of the Subject Set * @param {string} [subjectSetObject] Object of the Subject Set * @param {string} [subjectSetRelation] Relation of the Subject Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRelationships(pageSize?: number, pageToken?: string, namespace?: string, object?: string, relation?: string, subjectId?: string, subjectSetNamespace?: string, subjectSetObject?: string, subjectSetRelation?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Get all namespaces * @summary Query namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRelationshipNamespaces(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Use this endpoint to patch one or more relationships. * @summary Patch Multiple Relationships * @param {Array} [relationshipPatch] * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchRelationships(relationshipPatch?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * RelationshipApi - factory interface */ export declare const RelationshipApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * The OPL file is expected in the body of the request. * @summary Check the syntax of an OPL file * @param {RelationshipApiCheckOplSyntaxRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkOplSyntax(requestParameters?: RelationshipApiCheckOplSyntaxRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Use this endpoint to create a relationship. * @summary Create a Relationship * @param {RelationshipApiCreateRelationshipRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRelationship(requestParameters?: RelationshipApiCreateRelationshipRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Use this endpoint to delete relationships * @summary Delete Relationships * @param {RelationshipApiDeleteRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRelationships(requestParameters?: RelationshipApiDeleteRelationshipsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Get all relationships that match the query. Only the namespace field is required. * @summary Query relationships * @param {RelationshipApiGetRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRelationships(requestParameters?: RelationshipApiGetRelationshipsRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Get all namespaces * @summary Query namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRelationshipNamespaces(options?: RawAxiosRequestConfig): AxiosPromise; /** * Use this endpoint to patch one or more relationships. * @summary Patch Multiple Relationships * @param {RelationshipApiPatchRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchRelationships(requestParameters?: RelationshipApiPatchRelationshipsRequest, options?: RawAxiosRequestConfig): AxiosPromise; }; /** * Request parameters for checkOplSyntax operation in RelationshipApi. */ export interface RelationshipApiCheckOplSyntaxRequest { readonly body?: string; } /** * Request parameters for createRelationship operation in RelationshipApi. */ export interface RelationshipApiCreateRelationshipRequest { readonly createRelationshipBody?: CreateRelationshipBody; } /** * Request parameters for deleteRelationships operation in RelationshipApi. */ export interface RelationshipApiDeleteRelationshipsRequest { /** * Namespace of the Relationship */ readonly namespace?: string; /** * Object of the Relationship */ readonly object?: string; /** * Relation of the Relationship */ readonly relation?: string; /** * SubjectID of the Relationship */ readonly subjectId?: string; /** * Namespace of the Subject Set */ readonly subjectSetNamespace?: string; /** * Object of the Subject Set */ readonly subjectSetObject?: string; /** * Relation of the Subject Set */ readonly subjectSetRelation?: string; } /** * Request parameters for getRelationships operation in RelationshipApi. */ export interface RelationshipApiGetRelationshipsRequest { /** * Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). */ readonly pageSize?: number; /** * Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). */ readonly pageToken?: string; /** * Namespace of the Relationship */ readonly namespace?: string; /** * Object of the Relationship */ readonly object?: string; /** * Relation of the Relationship */ readonly relation?: string; /** * SubjectID of the Relationship */ readonly subjectId?: string; /** * Namespace of the Subject Set */ readonly subjectSetNamespace?: string; /** * Object of the Subject Set */ readonly subjectSetObject?: string; /** * Relation of the Subject Set */ readonly subjectSetRelation?: string; } /** * Request parameters for patchRelationships operation in RelationshipApi. */ export interface RelationshipApiPatchRelationshipsRequest { readonly relationshipPatch?: Array; } /** * RelationshipApi - object-oriented interface */ export declare class RelationshipApi extends BaseAPI { /** * The OPL file is expected in the body of the request. * @summary Check the syntax of an OPL file * @param {RelationshipApiCheckOplSyntaxRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkOplSyntax(requestParameters?: RelationshipApiCheckOplSyntaxRequest, options?: RawAxiosRequestConfig): Promise>; /** * Use this endpoint to create a relationship. * @summary Create a Relationship * @param {RelationshipApiCreateRelationshipRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRelationship(requestParameters?: RelationshipApiCreateRelationshipRequest, options?: RawAxiosRequestConfig): Promise>; /** * Use this endpoint to delete relationships * @summary Delete Relationships * @param {RelationshipApiDeleteRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRelationships(requestParameters?: RelationshipApiDeleteRelationshipsRequest, options?: RawAxiosRequestConfig): Promise>; /** * Get all relationships that match the query. Only the namespace field is required. * @summary Query relationships * @param {RelationshipApiGetRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRelationships(requestParameters?: RelationshipApiGetRelationshipsRequest, options?: RawAxiosRequestConfig): Promise>; /** * Get all namespaces * @summary Query namespaces * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRelationshipNamespaces(options?: RawAxiosRequestConfig): Promise>; /** * Use this endpoint to patch one or more relationships. * @summary Patch Multiple Relationships * @param {RelationshipApiPatchRelationshipsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchRelationships(requestParameters?: RelationshipApiPatchRelationshipsRequest, options?: RawAxiosRequestConfig): Promise>; }