import { ICreateOAuthAppOption, IOAuthApp } from "./shared/types/oAuthType.js"; /** * Used to register an OAuth2.0 app. See the [OAuth2.0](https://developers.arcgis.com/documentation/mapping-apis-and-services/security/oauth-2.0/) for more information. * * ```js * import { createOAuthApp, IOAuthApp } from '@esri/arcgis-rest-developer-credentials'; * import { ArcGISIdentityManager } from "@esri/arcgis-rest-request"; * * const authSession: ArcGISIdentityManager = await ArcGISIdentityManager.signIn({ * username: "xyz_usrName", * password: "xyz_pw" * }); * * createOAuthApp({ * title: "xyz_title", * description: "xyz_desc", * tags: ["xyz_tag1", "xyz_tag2"], * redirect_uris: ["http://localhost:3000/"], * authentication: authSession * }).then((registeredOAuthApp: IOAuthApp) => { * // => {redirect_uris: ["http://localhost:3000/"], item: {tags: ["xyz_tag1", "xyz_tag2"], ...}, ...} * }).catch(e => { * // => an exception object * }); * ``` * * @param requestOptions - Options for {@linkcode createOAuthApp | createOAuthApp()}, including necessary params to register an OAuth app and an {@linkcode @esri/arcgis-rest-request!ArcGISIdentityManager} authentication session. * @returns A Promise that will resolve to an {@linkcode IOAuthApp} object representing the newly registered OAuth app. */ export declare function createOAuthApp(requestOptions: ICreateOAuthAppOption): Promise;