/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Flatfile from "../../../index"; export declare namespace Apps { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Apps { protected readonly _options: Apps.Options; constructor(_options?: Apps.Options); /** * Returns apps in an account * * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.list() */ list(requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __list; /** * Returns an app * * @param {Flatfile.AppId} appId - ID of app * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.get("us_app_YOUR_ID") */ get(appId: Flatfile.AppId, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates an app * * @param {Flatfile.AppId} appId - ID of app * @param {Flatfile.AppPatch} request * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.update("us_app_YOUR_ID", { * name: "Nightly Data Loads", * namespace: "nightly-data", * entity: "Sync", * entityPlural: "Syncs", * icon: "\n \n", * metadata: { * "foo": "bar" * } * }) */ update(appId: Flatfile.AppId, request: Flatfile.AppPatch, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __update; /** * Creates an app * * @param {Flatfile.AppCreate} request * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.create({ * name: "Nightly Data Loads", * namespace: "nightly-data", * type: "CUSTOM", * entity: "Sync", * entityPlural: "Syncs", * icon: "\n \n", * metadata: { * "foo": "bar" * } * }) */ create(request: Flatfile.AppCreate, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __create; /** * Deletes an app * * @param {Flatfile.AppId} appId - ID of app to delete * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.delete("us_app_YOUR_ID") */ delete(appId: Flatfile.AppId, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __delete; /** * Returns constraints for an app * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.GetConstraintsRequest} request * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.getConstraints("appId") */ getConstraints(appId: Flatfile.AppId, request?: Flatfile.GetConstraintsRequest, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __getConstraints; /** * Creates a new constraint for an app * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintCreate} request * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.createConstraint("appId", {}) */ createConstraint(appId: Flatfile.AppId, request: Flatfile.ConstraintCreate, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __createConstraint; /** * Returns a specific constraint * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintId} constraintId - ID of the constraint * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.getConstraintById("appId", "constraintId") */ getConstraintById(appId: Flatfile.AppId, constraintId: Flatfile.ConstraintId, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __getConstraintById; /** * Returns the versions of a specific constraint * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintId} constraintId - ID of the constraint * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.getConstraintVersions("appId", "constraintId") */ getConstraintVersions(appId: Flatfile.AppId, constraintId: Flatfile.ConstraintId, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __getConstraintVersions; /** * Returns a specified version of a specific constraint * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintId} constraintId - ID of the constraint * @param {number} version - Version of the constraint * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.getConstraintVersion("appId", "constraintId", 1) */ getConstraintVersion(appId: Flatfile.AppId, constraintId: Flatfile.ConstraintId, version: number, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __getConstraintVersion; /** * Updates a specific constraint * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintId} constraintId - ID of the constraint * @param {Flatfile.ConstraintUpdate} request * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.updateConstraint("appId", "constraintId", {}) */ updateConstraint(appId: Flatfile.AppId, constraintId: Flatfile.ConstraintId, request: Flatfile.ConstraintUpdate, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __updateConstraint; /** * Deletes a specific constraint * * @param {Flatfile.AppId} appId - ID of the app * @param {Flatfile.ConstraintId} constraintId - ID of the constraint * @param {Apps.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.apps.deleteConstraint("appId", "constraintId") */ deleteConstraint(appId: Flatfile.AppId, constraintId: Flatfile.ConstraintId, requestOptions?: Apps.RequestOptions): core.HttpResponsePromise; private __deleteConstraint; protected _getAuthorizationHeader(): Promise; }