api-gql.gql (578 lines of code) (raw):
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
type BasicPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
type ChangeRecoveryCodesPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
recoveryCodes: [String!]!
}
type CreateTotpPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
qrCodeUrl: String!
secret: String!
recoveryCodes: [String!]!
}
type PasswordForgotSendCodePayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
passwordForgotToken: String!
}
type PasswordForgotVerifyCodePayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
accountResetToken: String!
}
type PasswordForgotCodeStatusPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
tries: Float!
ttl: Float!
}
type AccountResetPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String
sessionToken: String
verified: Boolean
authAt: Float
keyFetchToken: String
unwrapBKey: String
}
type SessionReauthedAccountPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
verified: Boolean!
authAt: Float!
metricsEnabled: Boolean!
keyFetchToken: String
verificationMethod: String
verificationReason: String
}
type SignedInAccountPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
verified: Boolean!
authAt: Float!
metricsEnabled: Boolean!
keyFetchToken: String
verificationMethod: String
verificationReason: String
sessionToken: String!
}
type Avatar {
"""url for the user's avatar."""
url: String
"""ID for the user's avatar."""
id: String
}
type UpdateDisplayNamePayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Updated display name. Null if an error occurred."""
displayName: String
}
type VerifyTotpPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
success: Boolean!
recoveryCodes: [String!]
}
type AccountStatusPayload {
"""Whether or not the account exists"""
exists: Boolean!
}
type RecoveryKeyBundlePayload {
recoveryData: String!
}
type PasswordChangePayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
sessionToken: String!
verified: Boolean!
authAt: Float!
unwrapBKey: String
keyFetchToken: String
}
type LegalDoc {
"""Document in markdown format"""
markdown: String!
}
type SignedUpAccountPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
sessionToken: String!
keyFetchToken: String
authAt: Float!
verificationMethod: String
}
type Location {
city: String
country: String
state: String
stateCode: String
}
type AttachedClient {
clientId: String
sessionTokenId: String
refreshTokenId: String
deviceId: String
deviceType: String
isCurrentSession: Boolean!
name: String
createdTime: Float
createdTimeFormatted: String
lastAccessTime: Float
lastAccessTimeFormatted: String
approximateLastAccessTime: Float
approximateLastAccessTimeFormatted: String
scope: [String!]
location: Location
userAgent: String!
os: String
}
type Email {
email: String!
isPrimary: Boolean!
verified: Boolean!
}
type Subscription {
created: Float
currentPeriodEnd: Float!
currentPeriodStart: Float!
cancelAtPeriodEnd: Boolean!
endAt: Float!
latestInvoice: String!
planId: String!
productName: String!
productId: String!
status: String!
subscriptionId: String!
}
"""Two-factor authentication configuration (TOTP)."""
type Totp {
"""Whether a TOTP token exists for the user."""
exists: Boolean!
"""Whether the current session was verified with the TOTP token."""
verified: Boolean!
}
type LinkedAccount {
providerId: Float!
enabled: Boolean!
authAt: Float!
}
type SecurityEvent {
name: String!
createdAt: Float!
verified: Boolean
}
"""The current authenticated user's Firefox Account record."""
type Account {
"""Firefox Account User ID."""
uid: ID!
"""Timestamp when the account was created."""
accountCreated: Float!
"""Timestamp the password was created or last changed."""
passwordCreated: Float!
"""Display name the user has set."""
displayName: String
avatar: Avatar!
"""User locale."""
locale: String
"""Active subscriptions for the user."""
subscriptions: [Subscription!]!
totp: Totp!
"""Whether the user has had an account recovery key issued."""
recoveryKey: Boolean!
"""Whether metrics are enabled and may be reported"""
metricsEnabled: Boolean!
"""Email addresses for the user."""
emails: [Email!]!
"""Client sessions attached to the user."""
attachedClients: [AttachedClient!]!
"""Linked accounts"""
linkedAccounts: [LinkedAccount!]!
"""Security events"""
securityEvents: [SecurityEvent!]!
}
type FinishedSetupAccountPayload {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
sessionToken: String!
verified: Boolean!
}
"""Session (token) info"""
type Session {
"""Whether the current session is verified"""
verified: Boolean!
}
"""Session status"""
type SessionStatus {
"""uid of the account"""
uid: String!
"""Whether the current session is verified"""
state: String!
}
type Query {
account: Account
"""
Check the status of an account using session token or uid. This query is equivalent to the GET /account/status endpoint in auth-server.
"""
accountStatus(input: AccountStatusInput!): AccountStatusPayload!
"""
Retrieves a user recovery key bundle from its recovery key id. The bundle contains an encrypted copy for the sync key.
"""
getRecoveryKeyBundle(input: RecoveryKeyBundleInput!): RecoveryKeyBundlePayload!
session: Session!
sessionStatus: SessionStatus!
getLegalDoc(input: LegalInput!): LegalDoc!
}
input AccountStatusInput {
"""The uid to apply this operation to."""
uid: String
"""The token id to apply this operation to."""
token: String
}
input RecoveryKeyBundleInput {
"""Account reset token"""
accountResetToken: String!
"""Recovery key to check"""
recoveryKeyId: String!
}
input LegalInput {
"""The requested l10n locale."""
locale: String
"""The requested legal file."""
file: String!
}
type Mutation {
"""Creates a new password for a user and overrides encryption keys"""
createPassword(input: CreatePassword!): BasicPayload!
"""
Create a new randomly generated TOTP token for a user if they do not currently have one.
"""
createTotp(input: CreateTotpInput!): CreateTotpPayload!
"""Verifies the current session if the passed TOTP code is valid."""
verifyTotp(input: VerifyTotpInput!): VerifyTotpPayload!
"""Deletes the current TOTP token for the user."""
deleteTotp(input: DeleteTotpInput!): BasicPayload!
"""Deletes the current recovery key for the user."""
deleteRecoveryKey(input: DeleteRecoveryKeyInput!): BasicPayload!
"""Return new backup authentication codes while removing old ones."""
changeRecoveryCodes(input: ChangeRecoveryCodesInput!): ChangeRecoveryCodesPayload!
"""Update the display name."""
updateDisplayName(input: UpdateDisplayNameInput!): UpdateDisplayNamePayload!
"""Delete the avatar."""
deleteAvatar(input: DeleteAvatarInput!): BasicPayload!
"""Create a secondary email for the signed in account."""
createSecondaryEmail(input: EmailInput!): BasicPayload!
"""Reset the verification code to a secondary email."""
resendSecondaryEmailCode(input: EmailInput!): BasicPayload!
"""Verify the email address with a code."""
verifySecondaryEmail(input: VerifyEmailInput!): BasicPayload!
"""Remove the secondary email for the signed in account."""
deleteSecondaryEmail(input: EmailInput!): BasicPayload!
"""
Change users primary email address, this email address must belong to the user and be verified.
"""
updatePrimaryEmail(input: EmailInput!): BasicPayload!
"""
Destroy all tokens held by a connected client, disconnecting it from the user's account.
"""
attachedClientDisconnect(input: AttachedClientDisconnectInput!): BasicPayload!
"""Send a session verification email."""
sendSessionVerificationCode(input: SendSessionVerificationInput!): BasicPayload!
"""Verify the session via an email code."""
verifySession(input: VerifySessionInput!): BasicPayload!
"""Set the metrics opt in or out state"""
metricsOpt(input: MetricsOptInput!): BasicPayload!
"""Send a password reset email."""
passwordForgotSendCode(input: PasswordForgotSendCodeInput!): PasswordForgotSendCodePayload!
"""Verify password forgot token, returns account reset token"""
passwordForgotVerifyCode(input: PasswordForgotVerifyCodeInput!): PasswordForgotVerifyCodePayload!
"""Verify password forgot token, returns account reset token"""
passwordForgotCodeStatus(input: PasswordForgotCodeStatusInput!): PasswordForgotCodeStatusPayload!
"""Resets an account"""
accountReset(input: AccountResetInput!): AccountResetPayload!
"""Call auth-server to sign up an account"""
SignUp(input: SignUpInput!): SignedUpAccountPayload!
"""Call auth-server to finish signing up a "stub" account"""
finishSetup(input: FinishSetupInput!): FinishedSetupAccountPayload!
"""Call auth-server to sign in an account"""
signIn(input: SignInInput!): SignedInAccountPayload!
"""
Used to reject and report unblock codes that were not requested by the user.
"""
rejectUnblockCode(input: RejectUnblockCodeInput!): BasicPayload!
"""Used to verify a users primary email address."""
emailVerifyCode(input: VerifyEmailCodeInput!): BasicPayload!
"""
Change a user's password. The client is required to compute authPW since we don't send the clear password to our server.
"""
passwordChange(input: PasswordChangeInput!): PasswordChangePayload!
"""Logs out the current session"""
destroySession(input: DestroySessionInput!): BasicPayload!
"""Re-authenticate an existing session token."""
reauthSession(input: SessionReauthInput!): SessionReauthedAccountPayload!
"""Resend a verify code."""
resendVerifyCode(input: BasicMutationInput!): BasicPayload!
"""Verify a OTP code."""
verifyCode(input: SessionVerifyCodeInput!): BasicPayload!
}
input CreatePassword {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Users email, used to hash password"""
email: String!
"""The new password"""
password: String!
}
input CreateTotpInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
metricsContext: MetricsContext
}
"""Metrics context."""
input MetricsContext {
"""The id of the client's device record, if it has registered one."""
deviceId: String
entrypoint: String
entrypointExperiment: String
entrypointVariation: String
flowId: String
flowBeginTime: Float
productId: String
planId: String
utmCampaign: String
utmContent: String
utmMedium: String
utmSource: String
utmTerm: String
}
input VerifyTotpInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The TOTP code to check"""
code: String!
service: String
}
input DeleteTotpInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input DeleteRecoveryKeyInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input ChangeRecoveryCodesInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input UpdateDisplayNameInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Updated display name."""
displayName: String
}
input DeleteAvatarInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The avatar id to delete."""
id: String!
}
input EmailInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The email address to apply this operation to."""
email: String!
}
input VerifyEmailInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The email to verify"""
email: String!
"""The code to check"""
code: String!
}
input AttachedClientDisconnectInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The OAuth client_id of the connected application."""
clientId: String
"""The id of the sessionToken held by that client, if any."""
sessionTokenId: String
"""The id of the OAuth refreshToken held by that client, if any."""
refreshTokenId: String
"""The id of the client's device record, if it has registered one."""
deviceId: String
}
input SendSessionVerificationInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input VerifySessionInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The code to check"""
code: String!
}
input MetricsOptInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""
The desired state: "in" or "out"
"""
state: String!
}
input PasswordForgotSendCodeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Users email"""
email: String!
metricsContext: MetricsContext
resume: String
service: String
lang: String
redirectTo: String
}
input PasswordForgotVerifyCodeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Password forgot token"""
token: String!
"""Code"""
code: String!
}
input PasswordForgotCodeStatusInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""Password forgot token"""
token: String!
}
input AccountResetInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
accountResetToken: String!
email: String!
newPassword: String!
options: AccountResetInputOptions
}
input AccountResetInputOptions {
keys: Boolean
sessionToken: Boolean
}
input SignUpInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
authPW: String!
email: String!
options: SignUpOptionsInput!
}
input SignUpOptionsInput {
keys: Boolean
service: String
redirectTo: String
resume: String
verificationMethod: String
preVerified: String
metricsContext: MetricsContext
}
input FinishSetupInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
token: String!
authPW: String!
}
input SignInInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
authPW: String!
email: String!
options: SignInOptionsInput!
}
input SignInOptionsInput {
keys: Boolean
service: String
reason: String
redirectTo: String
resume: String
verificationMethod: String
unblockCode: String
metricsContext: MetricsContext
}
input RejectUnblockCodeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
uid: String!
unblockCode: String!
}
input VerifyEmailCodeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The code to check"""
code: String!
"""Account uid"""
uid: String!
service: String
}
input PasswordChangeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
email: String!
oldPasswordAuthPW: String!
newPasswordAuthPW: String!
oldUnwrapBKey: String!
newUnwrapBKey: String!
options: PasswordChangeInputOptions
}
input PasswordChangeInputOptions {
keys: Boolean
sessionToken: String
}
input DestroySessionInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input SessionReauthInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
authPW: String!
email: String!
options: SessionReauthOptionsInput!
sessionToken: String!
}
input SessionReauthOptionsInput {
keys: Boolean
service: String
reason: String
redirectTo: String
resume: String
verificationMethod: String
unblockCode: String
metricsContext: MetricsContext
}
input BasicMutationInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
}
input SessionVerifyCodeInput {
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
"""The code to check"""
code: String!
options: SessionVerifyCodeOptionsInput!
}
input SessionVerifyCodeOptionsInput {
service: String
scopes: [String!]
newsletters: [String!]
}