本文整理汇总了TypeScript中@poetapp/frost-client.Frost类的典型用法代码示例。如果您正苦于以下问题:TypeScript Frost类的具体用法?TypeScript Frost怎么用?TypeScript Frost使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Frost类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: GetProfileFrost
async function GetProfileFrost(
token: string,
password: string
): Promise<{ readonly createdAt: number; readonly verified: boolean }> {
const frost = new Frost({ host: '/api' })
return await frost.getProfile(token)
}
示例2: signInFrost
async function signInFrost(data: {
readonly email: string
readonly password: string
}): Promise<{ readonly token: string }> {
const { email, password } = data
const frost = new Frost({ host: '/api' })
return await frost.login(email, password)
}
示例3: CreateApiTokenFrost
async function CreateApiTokenFrost(apiToken: string): Promise<{ readonly apiToken: string }> {
const frost = new Frost({ host: '/api' })
return await frost.createApiToken(apiToken)
}
示例4: GetApiTokensFrost
async function GetApiTokensFrost(email: string): Promise<string> {
const frost = new Frost({ host: '/api' })
return await frost.sendEmailForgotPassword(email)
}
示例5: ChangePasswordTokenFrost
async function ChangePasswordTokenFrost(token: string, password: string): Promise<{ readonly token: string }> {
const frost = new Frost({ host: '/api' })
return await frost.changePasswordWithToken(token, password)
}
示例6: DeleteApiTokenFrost
async function DeleteApiTokenFrost(token: string, tokenId: string): Promise<string> {
const frost = new Frost({ host: '/api' })
return await frost.removeApiToken(token, tokenId)
}
示例7: SendEmailVerifiedAccountFrost
async function SendEmailVerifiedAccountFrost(data: { readonly token: string }): Promise<string> {
const { token } = data
const frost = new Frost({ host: '/api' })
return await frost.sendEmailVerifyAccount(token)
}
示例8: GetApiTokensFrost
async function GetApiTokensFrost(token: string, password: string): Promise<{ readonly token: string }> {
const frost = new Frost({ host: '/api' })
return await frost.verifyAccount(token)
}
示例9: GetApiTokensFrost
async function GetApiTokensFrost(apiToken: string): Promise<{ readonly apiTokens: ReadonlyArray<string> }> {
const frost = new Frost({ host: '/api' })
return await frost.getApiTokens(apiToken)
}