123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480 |
- // Copyright 2022 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- // This file was generated by:
- // tools/json_schema_compiler/compiler.py.
- // NOTE: The format of types has changed. 'FooType' is now
- // 'chrome.passwordsPrivate.FooType'.
- // Please run the closure compiler before committing changes.
- // See https://chromium.googlesource.com/chromium/src/+/main/docs/closure_compilation.md
- /** @fileoverview Externs generated from namespace: passwordsPrivate */
- /** @const */
- chrome.passwordsPrivate = {};
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.PlaintextReason = {
- VIEW: 'VIEW',
- COPY: 'COPY',
- EDIT: 'EDIT',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.ExportProgressStatus = {
- NOT_STARTED: 'NOT_STARTED',
- IN_PROGRESS: 'IN_PROGRESS',
- SUCCEEDED: 'SUCCEEDED',
- FAILED_CANCELLED: 'FAILED_CANCELLED',
- FAILED_WRITE_FAILED: 'FAILED_WRITE_FAILED',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.CompromiseType = {
- LEAKED: 'LEAKED',
- PHISHED: 'PHISHED',
- PHISHED_AND_LEAKED: 'PHISHED_AND_LEAKED',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.PasswordStoreSet = {
- DEVICE: 'DEVICE',
- ACCOUNT: 'ACCOUNT',
- DEVICE_AND_ACCOUNT: 'DEVICE_AND_ACCOUNT',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.PasswordCheckState = {
- IDLE: 'IDLE',
- RUNNING: 'RUNNING',
- CANCELED: 'CANCELED',
- OFFLINE: 'OFFLINE',
- SIGNED_OUT: 'SIGNED_OUT',
- NO_PASSWORDS: 'NO_PASSWORDS',
- QUOTA_LIMIT: 'QUOTA_LIMIT',
- OTHER_ERROR: 'OTHER_ERROR',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.ImportResultsStatus = {
- UNKNOWN_ERROR: 'UNKNOWN_ERROR',
- SUCCESS: 'SUCCESS',
- IO_ERROR: 'IO_ERROR',
- BAD_FORMAT: 'BAD_FORMAT',
- DISMISSED: 'DISMISSED',
- MAX_FILE_SIZE: 'MAX_FILE_SIZE',
- IMPORT_ALREADY_ACTIVE: 'IMPORT_ALREADY_ACTIVE',
- NUM_PASSWORDS_EXCEEDED: 'NUM_PASSWORDS_EXCEEDED',
- };
- /**
- * @enum {string}
- */
- chrome.passwordsPrivate.ImportEntryStatus = {
- UNKNOWN_ERROR: 'UNKNOWN_ERROR',
- MISSING_PASSWORD: 'MISSING_PASSWORD',
- MISSING_URL: 'MISSING_URL',
- INVALID_URL: 'INVALID_URL',
- NON_ASCII_URL: 'NON_ASCII_URL',
- LONG_URL: 'LONG_URL',
- LONG_PASSWORD: 'LONG_PASSWORD',
- LONG_USERNAME: 'LONG_USERNAME',
- CONFLICT_PROFILE: 'CONFLICT_PROFILE',
- CONFLICT_ACCOUNT: 'CONFLICT_ACCOUNT',
- };
- /**
- * @typedef {{
- * status: !chrome.passwordsPrivate.ImportEntryStatus,
- * url: string,
- * username: string
- * }}
- */
- chrome.passwordsPrivate.ImportEntry;
- /**
- * @typedef {{
- * status: !chrome.passwordsPrivate.ImportResultsStatus,
- * numberImported: number,
- * failedImports: !Array<!chrome.passwordsPrivate.ImportEntry>,
- * fileName: string
- * }}
- */
- chrome.passwordsPrivate.ImportResults;
- /**
- * @typedef {{
- * signonRealm: string,
- * shown: string,
- * link: string
- * }}
- */
- chrome.passwordsPrivate.UrlCollection;
- /**
- * @typedef {{
- * compromiseTime: number,
- * elapsedTimeSinceCompromise: string,
- * compromiseType: !chrome.passwordsPrivate.CompromiseType,
- * isMuted: boolean
- * }}
- */
- chrome.passwordsPrivate.CompromisedInfo;
- /**
- * @typedef {{
- * urls: !chrome.passwordsPrivate.UrlCollection,
- * username: string,
- * password: (string|undefined),
- * federationText: (string|undefined),
- * id: number,
- * storedIn: !chrome.passwordsPrivate.PasswordStoreSet,
- * isAndroidCredential: boolean,
- * note: (string|undefined),
- * changePasswordUrl: (string|undefined),
- * hasStartableScript: boolean,
- * compromisedInfo: (!chrome.passwordsPrivate.CompromisedInfo|undefined)
- * }}
- */
- chrome.passwordsPrivate.PasswordUiEntry;
- /**
- * @typedef {{
- * urls: !chrome.passwordsPrivate.UrlCollection,
- * id: number
- * }}
- */
- chrome.passwordsPrivate.ExceptionEntry;
- /**
- * @typedef {{
- * status: !chrome.passwordsPrivate.ExportProgressStatus,
- * folderName: (string|undefined)
- * }}
- */
- chrome.passwordsPrivate.PasswordExportProgress;
- /**
- * @typedef {{
- * state: !chrome.passwordsPrivate.PasswordCheckState,
- * alreadyProcessed: (number|undefined),
- * remainingInQueue: (number|undefined),
- * elapsedTimeSinceLastCheck: (string|undefined)
- * }}
- */
- chrome.passwordsPrivate.PasswordCheckStatus;
- /**
- * @typedef {{
- * url: string,
- * username: string,
- * password: string,
- * note: string,
- * useAccountStore: boolean
- * }}
- */
- chrome.passwordsPrivate.AddPasswordOptions;
- /**
- * @typedef {{
- * username: string,
- * password: string,
- * note: (string|undefined)
- * }}
- */
- chrome.passwordsPrivate.ChangeSavedPasswordParams;
- /**
- * Function that logs that the Passwords page was accessed from the Chrome
- * Settings WebUI.
- */
- chrome.passwordsPrivate.recordPasswordsPageAccessInSettings = function() {};
- /**
- * Changes the saved password corresponding to |id|. Invokes |callback| or
- * raises an error depending on whether the operation succeeded.
- * @param {number} id The id for the password entry being updated.
- * @param {!chrome.passwordsPrivate.ChangeSavedPasswordParams} params The
- * dictionary which holds the changed parameters.
- * @param {function(number): void=} callback The callback that gets invoked in
- * the end.
- */
- chrome.passwordsPrivate.changeSavedPassword = function(id, params, callback) {};
- /**
- * Removes the saved password corresponding to |id| in |fromStores|. If no saved
- * password for this pair exists, this function is a no-op.
- * @param {number} id The id for the password entry being removed.
- * @param {!chrome.passwordsPrivate.PasswordStoreSet} fromStores The store(s)
- * from which the password entry is being removed.
- */
- chrome.passwordsPrivate.removeSavedPassword = function(id, fromStores) {};
- /**
- * Removes the saved password exception corresponding to |id|. If no exception
- * with this id exists, this function is a no-op. This will remove exception
- * from both stores.
- * @param {number} id The id for the exception url entry is being removed.
- */
- chrome.passwordsPrivate.removePasswordException = function(id) {};
- /**
- * Undoes the last removal of saved password(s) or exception(s).
- */
- chrome.passwordsPrivate.undoRemoveSavedPasswordOrException = function() {};
- /**
- * Returns the plaintext password corresponding to |id|. Note that on some
- * operating systems, this call may result in an OS-level reauthentication. Once
- * the password has been fetched, it will be returned via |callback|.
- * @param {number} id The id for the password entry being being retrieved.
- * @param {!chrome.passwordsPrivate.PlaintextReason} reason The reason why the
- * plaintext password is requested.
- * @param {function(string): void} callback The callback that gets invoked with
- * the retrieved password.
- */
- chrome.passwordsPrivate.requestPlaintextPassword = function(id, reason, callback) {};
- /**
- * Returns the PasswordUiEntry (with |password| field filled) corresponding to
- * |id|. Note that on some operating systems, this call may result in an
- * OS-level reauthentication. Once the PasswordUiEntry has been fetched, it will
- * be returned via |callback|.
- * @param {number} id The id for the password entry being being retrieved.
- * @param {function(!chrome.passwordsPrivate.PasswordUiEntry): void} callback
- * The callback that gets invoked with the retrieved PasswordUiEntry.
- */
- chrome.passwordsPrivate.requestCredentialDetails = function(id, callback) {};
- /**
- * Returns the list of saved passwords.
- * @param {function(!Array<!chrome.passwordsPrivate.PasswordUiEntry>): void}
- * callback Called with the list of saved passwords.
- */
- chrome.passwordsPrivate.getSavedPasswordList = function(callback) {};
- /**
- * Returns the list of password exceptions.
- * @param {function(!Array<!chrome.passwordsPrivate.ExceptionEntry>): void}
- * callback Called with the list of password exceptions.
- */
- chrome.passwordsPrivate.getPasswordExceptionList = function(callback) {};
- /**
- * Moves passwords currently stored on the device to being stored in the
- * signed-in, non-syncing Google Account. For each id, the result is a no-op if
- * any of these is true: |id| is invalid; |id| corresponds to a password already
- * stored in the account; or the user is not using the account-scoped password
- * storage.
- * @param {!Array<number>} ids The ids for the password entries being moved.
- */
- chrome.passwordsPrivate.movePasswordsToAccount = function(ids) {};
- /**
- * Triggers the Password Manager password import functionality.
- * @param {!chrome.passwordsPrivate.PasswordStoreSet} toStore
- * @param {function(!chrome.passwordsPrivate.ImportResults): void} callback
- */
- chrome.passwordsPrivate.importPasswords = function(toStore, callback) {};
- /**
- * Triggers the Password Manager password export functionality. Completion Will
- * be signaled by the onPasswordsFileExportProgress event. |callback| will be
- * called when the request is started or rejected. If rejected
- * $(ref:runtime.lastError) will be set to <code>'in-progress'</code> or
- * <code>'reauth-failed'</code>.
- * @param {function(): void} callback
- */
- chrome.passwordsPrivate.exportPasswords = function(callback) {};
- /**
- * Requests the export progress status. This is the same as the last value seen
- * on the onPasswordsFileExportProgress event. This function is useful for
- * checking if an export has already been initiated from an older tab, where we
- * might have missed the original event.
- * @param {function(!chrome.passwordsPrivate.ExportProgressStatus): void}
- * callback
- */
- chrome.passwordsPrivate.requestExportProgressStatus = function(callback) {};
- /**
- * Stops exporting passwords and cleans up any passwords, which were already
- * written to the filesystem.
- */
- chrome.passwordsPrivate.cancelExportPasswords = function() {};
- /**
- * Requests the account-storage opt-in state of the current user.
- * @param {function(boolean): void} callback
- */
- chrome.passwordsPrivate.isOptedInForAccountStorage = function(callback) {};
- /**
- * Triggers the opt-in or opt-out flow for the account storage.
- * @param {boolean} optIn
- */
- chrome.passwordsPrivate.optInForAccountStorage = function(optIn) {};
- /**
- * Requests the latest compromised credentials.
- * @param {function(!Array<!chrome.passwordsPrivate.PasswordUiEntry>): void}
- * callback
- */
- chrome.passwordsPrivate.getCompromisedCredentials = function(callback) {};
- /**
- * Requests the latest weak credentials.
- * @param {function(!Array<!chrome.passwordsPrivate.PasswordUiEntry>): void}
- * callback
- */
- chrome.passwordsPrivate.getWeakCredentials = function(callback) {};
- /**
- * Requests to mute |credential| from the password store. Invokes |callback| on
- * completion.
- * @param {!chrome.passwordsPrivate.PasswordUiEntry} credential
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.muteInsecureCredential = function(credential, callback) {};
- /**
- * Requests to unmute |credential| from the password store. Invokes |callback|
- * on completion.
- * @param {!chrome.passwordsPrivate.PasswordUiEntry} credential
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.unmuteInsecureCredential = function(credential, callback) {};
- /**
- * Records that a change password flow was started for |credential|.
- * @param {!chrome.passwordsPrivate.PasswordUiEntry} credential The credential
- * for which the flow was triggered.
- * @param {boolean} isManualFlow
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.recordChangePasswordFlowStarted = function(credential, isManualFlow, callback) {};
- /**
- * Refreshes the cache for automatic password change scripts if it is stale.
- * Invokes `callback` on completion.
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.refreshScriptsIfNecessary = function(callback) {};
- /**
- * Starts a check for insecure passwords. Invokes |callback| on completion.
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.startPasswordCheck = function(callback) {};
- /**
- * Stops checking for insecure passwords. Invokes |callback| on completion.
- * @param {function(): void=} callback
- */
- chrome.passwordsPrivate.stopPasswordCheck = function(callback) {};
- /**
- * Returns the current status of the check via |callback|.
- * @param {function(!chrome.passwordsPrivate.PasswordCheckStatus): void}
- * callback
- */
- chrome.passwordsPrivate.getPasswordCheckStatus = function(callback) {};
- /**
- * Starts an automated password change for |credential|. Invokes |callback| on
- * completion with a boolean parameter that signals whether the credential was
- * changed successfully.
- * @param {!chrome.passwordsPrivate.PasswordUiEntry} credential
- * @param {function(boolean): void=} callback
- */
- chrome.passwordsPrivate.startAutomatedPasswordChange = function(credential, callback) {};
- /**
- * Requests whether the account store is a default location for saving
- * passwords. False means the device store is a default one. Must be called when
- * the current user has already opted-in for account storage.
- * @param {function(boolean): void} callback
- */
- chrome.passwordsPrivate.isAccountStoreDefault = function(callback) {};
- /**
- * Requests whether the given |url| meets the requirements to save a password
- * for it (e.g. valid, has proper scheme etc.) and returns the corresponding
- * URLCollection on success. Otherwise it raises an error.
- * @param {string} url
- * @param {function(!chrome.passwordsPrivate.UrlCollection): void} callback
- */
- chrome.passwordsPrivate.getUrlCollection = function(url, callback) {};
- /**
- * Saves a new password entry described by the given |options|. Invokes
- * |callback| or raises an error depending on whether the operation succeeded.
- * @param {!chrome.passwordsPrivate.AddPasswordOptions} options Details about a
- * new password and storage to be used.
- * @param {function(): void=} callback The callback that gets invoked on
- * success.
- */
- chrome.passwordsPrivate.addPassword = function(options, callback) {};
- /**
- * Fired when the saved passwords list has changed, meaning that an entry has
- * been added or removed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onSavedPasswordsListChanged;
- /**
- * Fired when the password exceptions list has changed, meaning that an entry
- * has been added or removed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onPasswordExceptionsListChanged;
- /**
- * Fired when the status of the export has changed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onPasswordsFileExportProgress;
- /**
- * Fired when the opt-in state for the account-scoped storage has changed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onAccountStorageOptInStateChanged;
- /**
- * Fired when the compromised credentials changed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onCompromisedCredentialsChanged;
- /**
- * Fired when the weak credentials changed.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onWeakCredentialsChanged;
- /**
- * Fired when the status of the password check changes.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onPasswordCheckStatusChanged;
- /**
- * Fired when the password manager access timed out.
- * @type {!ChromeEvent}
- */
- chrome.passwordsPrivate.onPasswordManagerAuthTimeout;
|