import { ManagementClientOptions, AgreementInput, AgreementDetail, AgreementList } from './types'; import { GraphqlClient } from '../common/GraphqlClient'; import { HttpClient } from '../common/HttpClient'; import { ManagementTokenProvider } from './ManagementTokenProvider'; /** * @class AgreementManagementClient manage multi-factor authentication * @description Used to manage the registration agreement * * @example * * Please use the module in the following ways: * \`\`\`javascript * import { ManagementClient } from "appow-js-sdk" * const managementClient = new ManagementClient({ * userPoolId: "YOUR_USERPOOL_ID", * secret: "YOUR_USERPOOL_SECRET", * }) * managementClient.applications.listAgreement("APP_ID") // Get a list of registered agreements for an application * \`\`\` * * @name AgreementManagementClient */ export declare class AgreementManagementClient { options: ManagementClientOptions; graphqlClient: GraphqlClient; tokenProvider: ManagementTokenProvider; httpClient: HttpClient; constructor(options: ManagementClientOptions, graphqlClient: GraphqlClient, httpClient: HttpClient, tokenProvider: ManagementTokenProvider); /** * @description Create a registration agreement under an application * @param {object} appId Application ID * @param {object} agreement * @param {string} agreement.title Agreement title, which can include HTML A tags * @param {boolean} [agreement.required] Whether to allow registration, the default is true * @param {lang} [agreement.lang] Agreement title language, optional zh-CN, en-US, the default is zh-CN, the agreement will be displayed in the hosting login page according to the interface language */ create(appId: string, agreement: AgreementInput): Promise; /** * @description Get the list of application registration agreements * @param {string} appId Application ID */ list(appId: string): Promise; /** * @description Delete a registration agreement under the application * @param {string} appId Application ID * @param {number} agreementId Agreement ID */ delete(appId: string, agreementId: number): Promise; /** * @description Update a registration agreement under the application * @param {string} appId Application ID * @param {number} agreementId Agreement ID * @param {object} updates Update content * @param {string} [updates.title] Agreement title, which can include HTML A tags * @param {boolean} [updates.required] Whether to allow registration, the default is true * @param {lang} [updates.lang] Agreement title language, optional zh-CN, en-US, the default is zh-CN, the agreement will be displayed in the hosting login page according to the interface language */ modify(appId: string, agreementId: number, updates: AgreementInput): Promise; /** * @description Sort a registration agreements under an application * @param {string} appId Application ID * @param {number[]} order A list of IDs of all protocols under the application, in the order required */ sort(appId: string, order: number[]): Promise; }