import { GlobalOptions, APIRequestContext, FerantConfigurable } from '../../util/types'; export declare namespace datastore_v1 { interface Options extends GlobalOptions { version: 'v1'; } class Datastore { context: APIRequestContext; lifeword: Resource$Lifeword; assets: Resource$Assets; values: Resource$Values; todo: Resource$Todo; task: Resource$Task; goal: Resource$Goal; user: Resource$User; conversion: Resource$Conversion; constructor(options: GlobalOptions, ferant?: FerantConfigurable); } /** * */ class Resource$Lifeword { context: APIRequestContext; constructor(context: APIRequestContext); list(): Promise; top(): Promise; modify(sortKeyId: string, data: any): Promise; create(data: any): Promise; delete(sortKeyId: string): Promise; } /** * */ class Resource$Assets { context: APIRequestContext; constructor(context: APIRequestContext); list(): Promise; descriptions(): Promise; modify(sortKeyId: string, data: any): Promise; create(data: any): Promise; /** * */ delete(sortKeyId: string): Promise; } class Resource$Values { context: APIRequestContext; constructor(context: APIRequestContext); list(): Promise; descriptions(): Promise; } /** * */ class Resource$Todo { context: APIRequestContext; constructor(context: APIRequestContext); list(): Promise; } /** * */ class Resource$Task { context: APIRequestContext; constructor(context: APIRequestContext); get(params: Params$Resource$Task$Get): Promise; modify(sortKeyId: string, data: any): Promise; create(data: any): Promise; delete(sortKeyId: string): Promise; } interface Params$Resource$Task$Get { id?: string; } /** * */ class Resource$Goal { context: APIRequestContext; constructor(context: APIRequestContext); get(params: Params$Resource$Goal$Get): Promise; modify(sortKeyId: string, data: any): Promise; create(data: any): Promise; delete(sortKeyId: string): Promise; } interface Params$Resource$Goal$Get { id?: string; } interface Params$Resource$User { __typename?: string; createdAt?: string; email?: string; family_name?: string; fid?: string; given_name?: string; initialSurvey?: string; 'intake-data-consent'?: string; lifewordTaken?: string; username?: string; } interface Params$Resource$User$Get extends Params$Resource$User { [key: string]: any; } interface Params$Resource$User$Modify { [key: string]: any; } interface Params$Resource$User$Create extends Params$Resource$User { [key: string]: any; } /** * */ class Resource$User { context: APIRequestContext; constructor(context: APIRequestContext); /** * Retrieve user information. * * @returns a promise with dictionary */ get(): Promise; /** * Update user's data by one key/value pair. * * @param data * @returns the result if modification was successful */ modify(data: Params$Resource$User$Modify): Promise; /** * Create new user. * * @param data * @returns */ create(data: Params$Resource$User$Create): Promise; /** * Gets the Logs Router CMEK settings for the given resource.Note: CMEK for the Logs Router can currently only be configured for GCP organizations. Once configured, it applies to all projects and folders in the GCP organization.See Enabling CMEK for Logs Router (https://cloud.google.com/logging/docs/routing/managed-encryption) for more information. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://clerk.google.com/apis/api/datastore * // - Setup npm to pull from the Github Package Registry by creating an .npmrc file with the following contents: * // ``` * // registry = https://npm.pkg.github.com/TheFerant * // * // _authToken = ${AUTH_TOKEN} * // always-auth = true * // ``` * // - Install the npm module by running: * // `$ npm install @theferant/clerk-sdk-js` * * const {clerk} = require('@theferant/clerk-sdk-js'); * const datastore = clerk.datastore(); * * async function main() { * const auth = new clerk.auth.WardenAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://warden.ferant.io/auth/cloud-platform', * 'https://warden.ferant.io/auth/cloud-platform.read-only', * 'https://warden.ferant.io/auth/logging.admin', * 'https://warden.ferant.io/auth/logging.read', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * clerk.options({auth: authClient}); * * // Do the magic * const res = await datastore.user.delete(); * console.log(res.data); * * // Example response * // { * // "kmsKeyName": "my_kmsKeyName", * // "name": "my_name", * // "serviceAccountId": "my_serviceAccountId" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ delete(): Promise; } class Resource$Conversion { context: APIRequestContext; constructor(context: APIRequestContext); all(): Promise; assets(): Promise; values(): Promise; big5(): Promise; } }