From de9742064b0917e6bdda21a6a3b2745278e9b0a6 Mon Sep 17 00:00:00 2001 From: alistairjcbrown Date: Wed, 18 Oct 2023 10:05:34 +0000 Subject: [PATCH] Update autofill to 9.0.0 --- .../autofill/dist/autofill-debug.js | 75 +++++++++++++++++-- .../@duckduckgo/autofill/dist/autofill.js | 65 ++++++++++++++-- package-lock.json | 4 +- package.json | 2 +- 4 files changed, 130 insertions(+), 16 deletions(-) diff --git a/node_modules/@duckduckgo/autofill/dist/autofill-debug.js b/node_modules/@duckduckgo/autofill/dist/autofill-debug.js index 5ff88f0a31f8..5875c2c2a770 100644 --- a/node_modules/@duckduckgo/autofill/dist/autofill-debug.js +++ b/node_modules/@duckduckgo/autofill/dist/autofill-debug.js @@ -7110,8 +7110,11 @@ var _InterfacePrototype = _interopRequireDefault(require("./InterfacePrototype.j var _autofillUtils = require("../autofill-utils.js"); var _NativeUIController = require("../UI/controllers/NativeUIController.js"); var _appleUtils = require("@duckduckgo/content-scope-scripts/src/apple-utils"); +var _InContextSignup = require("../InContextSignup.js"); +var _deviceApiCalls = require("../deviceApiCalls/__generated__/deviceApiCalls.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class AndroidInterface extends _InterfacePrototype.default { + inContextSignup = new _InContextSignup.InContextSignup(this); async isEnabled() { return (0, _autofillUtils.autofillEnabled)(this.globalConfig, _appleUtils.processConfig); } @@ -7122,7 +7125,20 @@ class AndroidInterface extends _InterfacePrototype.default { async getAlias() { const { alias - } = await (0, _autofillUtils.sendAndWaitForAnswer)(() => { + } = await (0, _autofillUtils.sendAndWaitForAnswer)(async () => { + if (this.inContextSignup.isAvailable()) { + const { + isSignedIn + } = await this.deviceApi.request(new _deviceApiCalls.ShowInContextEmailProtectionSignupPromptCall(null)); + // On Android we can't get the input type data again without + // refreshing the page, so instead we can mutate it now that we + // know the user has Email Protection available. + if (this.globalConfig.availableInputTypes) { + this.globalConfig.availableInputTypes.email = isSignedIn; + } + this.updateForStateChange(); + this.onFinishedAutofill(); + } return window.EmailInterface.showTooltip(); }, 'getAliasResponse'); return alias; @@ -7153,7 +7169,9 @@ class AndroidInterface extends _InterfacePrototype.default { // ...on other domains we assume true because the script wouldn't exist otherwise return true; } - async setupAutofill() {} + async setupAutofill() { + await this.inContextSignup.init(); + } /** * Used by the email web app @@ -7210,6 +7228,14 @@ class AndroidInterface extends _InterfacePrototype.default { } } } + + /** + * Used by the email web app + * Provides functionality to close the window after in-context sign-up or sign-in + */ + closeEmailProtection() { + this.deviceApi.request(new _deviceApiCalls.CloseEmailProtectionTabCall(null)); + } addLogoutListener(handler) { // Only deal with logging out if we're in the email web app if (!this.globalConfig.isDDGDomain) return; @@ -7225,7 +7251,7 @@ class AndroidInterface extends _InterfacePrototype.default { } exports.AndroidInterface = AndroidInterface; -},{"../UI/controllers/NativeUIController.js":56,"../autofill-utils.js":61,"./InterfacePrototype.js":27,"@duckduckgo/content-scope-scripts/src/apple-utils":1}],24:[function(require,module,exports){ +},{"../InContextSignup.js":44,"../UI/controllers/NativeUIController.js":56,"../autofill-utils.js":61,"../deviceApiCalls/__generated__/deviceApiCalls.js":65,"./InterfacePrototype.js":27,"@duckduckgo/content-scope-scripts/src/apple-utils":1}],24:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -9240,7 +9266,7 @@ function initFormSubmissionsApi(forms, matching) { const focusedForm = [...forms.values()].find(form => form.hasFocus(e)); focusedForm?.submitHandler('global keydown + Enter'); } - }); + }, true); /** * Global pointer down events @@ -16543,7 +16569,7 @@ const constants = exports.constants = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.StoreFormDataCall = exports.StartEmailProtectionSignupCall = exports.SetSizeCall = exports.SetIncontextSignupPermanentlyDismissedAtCall = exports.SendJSPixelCall = exports.SelectedDetailCall = exports.OpenManagePasswordsCall = exports.OpenManageIdentitiesCall = exports.OpenManageCreditCardsCall = exports.GetRuntimeConfigurationCall = exports.GetIncontextSignupDismissedAtCall = exports.GetAvailableInputTypesCall = exports.GetAutofillInitDataCall = exports.GetAutofillDataCall = exports.GetAutofillCredentialsCall = exports.EmailProtectionStoreUserDataCall = exports.EmailProtectionRemoveUserDataCall = exports.EmailProtectionRefreshPrivateAddressCall = exports.EmailProtectionGetUserDataCall = exports.EmailProtectionGetIsLoggedInCall = exports.EmailProtectionGetCapabilitiesCall = exports.EmailProtectionGetAddressesCall = exports.CloseEmailProtectionTabCall = exports.CloseAutofillParentCall = exports.CheckCredentialsProviderStatusCall = exports.AskToUnlockProviderCall = exports.AddDebugFlagCall = void 0; +exports.StoreFormDataCall = exports.StartEmailProtectionSignupCall = exports.ShowInContextEmailProtectionSignupPromptCall = exports.SetSizeCall = exports.SetIncontextSignupPermanentlyDismissedAtCall = exports.SendJSPixelCall = exports.SelectedDetailCall = exports.OpenManagePasswordsCall = exports.OpenManageIdentitiesCall = exports.OpenManageCreditCardsCall = exports.GetRuntimeConfigurationCall = exports.GetIncontextSignupDismissedAtCall = exports.GetAvailableInputTypesCall = exports.GetAutofillInitDataCall = exports.GetAutofillDataCall = exports.GetAutofillCredentialsCall = exports.EmailProtectionStoreUserDataCall = exports.EmailProtectionRemoveUserDataCall = exports.EmailProtectionRefreshPrivateAddressCall = exports.EmailProtectionGetUserDataCall = exports.EmailProtectionGetIsLoggedInCall = exports.EmailProtectionGetCapabilitiesCall = exports.EmailProtectionGetAddressesCall = exports.CloseEmailProtectionTabCall = exports.CloseAutofillParentCall = exports.CheckCredentialsProviderStatusCall = exports.AskToUnlockProviderCall = exports.AddDebugFlagCall = void 0; var _validatorsZod = require("./validators.zod.js"); var _deviceApi = require("../../../packages/device-api"); /* DO NOT EDIT, this file was generated by scripts/api-call-generator.js */ @@ -16772,7 +16798,16 @@ exports.StartEmailProtectionSignupCall = StartEmailProtectionSignupCall; class CloseEmailProtectionTabCall extends _deviceApi.DeviceApiCall { method = "closeEmailProtectionTab"; } +/** + * @extends {DeviceApiCall} + */ exports.CloseEmailProtectionTabCall = CloseEmailProtectionTabCall; +class ShowInContextEmailProtectionSignupPromptCall extends _deviceApi.DeviceApiCall { + method = "ShowInContextEmailProtectionSignupPrompt"; + id = "ShowInContextEmailProtectionSignupPromptResponse"; + resultValidator = _validatorsZod.showInContextEmailProtectionSignupPromptSchema; +} +exports.ShowInContextEmailProtectionSignupPromptCall = ShowInContextEmailProtectionSignupPromptCall; },{"../../../packages/device-api":12,"./validators.zod.js":66}],66:[function(require,module,exports){ "use strict"; @@ -16780,7 +16815,7 @@ exports.CloseEmailProtectionTabCall = CloseEmailProtectionTabCall; Object.defineProperty(exports, "__esModule", { value: true }); -exports.userPreferencesSchema = exports.triggerContextSchema = exports.storeFormDataSchema = exports.setSizeParamsSchema = exports.setIncontextSignupPermanentlyDismissedAtSchema = exports.sendJSPixelParamsSchema = exports.selectedDetailParamsSchema = exports.runtimeConfigurationSchema = exports.providerStatusUpdatedSchema = exports.outgoingCredentialsSchema = exports.getRuntimeConfigurationResponseSchema = exports.getIncontextSignupDismissedAtSchema = exports.getAvailableInputTypesResultSchema = exports.getAutofillInitDataResponseSchema = exports.getAutofillDataResponseSchema = exports.getAutofillDataRequestSchema = exports.getAutofillCredentialsResultSchema = exports.getAutofillCredentialsParamsSchema = exports.getAliasResultSchema = exports.getAliasParamsSchema = exports.genericErrorSchema = exports.generatedPasswordSchema = exports.emailProtectionStoreUserDataParamsSchema = exports.emailProtectionRefreshPrivateAddressResultSchema = exports.emailProtectionGetUserDataResultSchema = exports.emailProtectionGetIsLoggedInResultSchema = exports.emailProtectionGetCapabilitiesResultSchema = exports.emailProtectionGetAddressesResultSchema = exports.credentialsSchema = exports.contentScopeSchema = exports.checkCredentialsProviderStatusResultSchema = exports.availableInputTypesSchema = exports.availableInputTypes1Schema = exports.autofillSettingsSchema = exports.autofillFeatureTogglesSchema = exports.askToUnlockProviderResultSchema = exports.apiSchema = exports.addDebugFlagParamsSchema = void 0; +exports.userPreferencesSchema = exports.triggerContextSchema = exports.storeFormDataSchema = exports.showInContextEmailProtectionSignupPromptSchema = exports.setSizeParamsSchema = exports.setIncontextSignupPermanentlyDismissedAtSchema = exports.sendJSPixelParamsSchema = exports.selectedDetailParamsSchema = exports.runtimeConfigurationSchema = exports.providerStatusUpdatedSchema = exports.outgoingCredentialsSchema = exports.getRuntimeConfigurationResponseSchema = exports.getIncontextSignupDismissedAtSchema = exports.getAvailableInputTypesResultSchema = exports.getAutofillInitDataResponseSchema = exports.getAutofillDataResponseSchema = exports.getAutofillDataRequestSchema = exports.getAutofillCredentialsResultSchema = exports.getAutofillCredentialsParamsSchema = exports.getAliasResultSchema = exports.getAliasParamsSchema = exports.genericErrorSchema = exports.generatedPasswordSchema = exports.emailProtectionStoreUserDataParamsSchema = exports.emailProtectionRefreshPrivateAddressResultSchema = exports.emailProtectionGetUserDataResultSchema = exports.emailProtectionGetIsLoggedInResultSchema = exports.emailProtectionGetCapabilitiesResultSchema = exports.emailProtectionGetAddressesResultSchema = exports.credentialsSchema = exports.contentScopeSchema = exports.checkCredentialsProviderStatusResultSchema = exports.availableInputTypesSchema = exports.availableInputTypes1Schema = exports.autofillSettingsSchema = exports.autofillFeatureTogglesSchema = exports.askToUnlockProviderResultSchema = exports.apiSchema = exports.addDebugFlagParamsSchema = void 0; var _zod = require("zod"); /* DO NOT EDIT, this file was generated by scripts/api-call-generator.js */ // Generated by ts-to-zod @@ -16843,6 +16878,11 @@ const emailProtectionStoreUserDataParamsSchema = exports.emailProtectionStoreUse userName: _zod.z.string(), cohort: _zod.z.string() }); +const showInContextEmailProtectionSignupPromptSchema = exports.showInContextEmailProtectionSignupPromptSchema = _zod.z.object({ + success: _zod.z.object({ + isSignedIn: _zod.z.boolean() + }) +}); const generatedPasswordSchema = exports.generatedPasswordSchema = _zod.z.object({ value: _zod.z.string(), username: _zod.z.string() @@ -17163,7 +17203,11 @@ const apiSchema = exports.apiSchema = _zod.z.object({ resultValidator: emailProtectionRefreshPrivateAddressResultSchema.optional() })).optional(), startEmailProtectionSignup: _zod.z.record(_zod.z.unknown()).optional(), - closeEmailProtectionTab: _zod.z.record(_zod.z.unknown()).optional() + closeEmailProtectionTab: _zod.z.record(_zod.z.unknown()).optional(), + ShowInContextEmailProtectionSignupPrompt: _zod.z.record(_zod.z.unknown()).and(_zod.z.object({ + id: _zod.z.literal("ShowInContextEmailProtectionSignupPromptResponse").optional(), + resultValidator: showInContextEmailProtectionSignupPromptSchema.optional() + })).optional() }); },{"zod":9}],67:[function(require,module,exports){ @@ -17229,6 +17273,23 @@ class AndroidTransport extends _index.DeviceApiTransport { if (deviceApiCall instanceof _deviceApiCalls.GetAvailableInputTypesCall) { return androidSpecificAvailableInputTypes(this.config); } + if (deviceApiCall instanceof _deviceApiCalls.GetIncontextSignupDismissedAtCall) { + window.BrowserAutofill.getIncontextSignupDismissedAt(JSON.stringify(deviceApiCall.params)); + return waitForResponse(deviceApiCall.id, this.config); + } + if (deviceApiCall instanceof _deviceApiCalls.SetIncontextSignupPermanentlyDismissedAtCall) { + return window.BrowserAutofill.setIncontextSignupPermanentlyDismissedAt(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.StartEmailProtectionSignupCall) { + return window.BrowserAutofill.startEmailProtectionSignup(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.CloseEmailProtectionTabCall) { + return window.BrowserAutofill.closeEmailProtectionTab(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.ShowInContextEmailProtectionSignupPromptCall) { + window.BrowserAutofill.showInContextEmailProtectionSignupPrompt(JSON.stringify(deviceApiCall.params)); + return waitForResponse(deviceApiCall.id, this.config); + } if (deviceApiCall instanceof _deviceApiCalls.GetAutofillDataCall) { window.BrowserAutofill.getAutofillData(JSON.stringify(deviceApiCall.params)); return waitForResponse(deviceApiCall.id, this.config); diff --git a/node_modules/@duckduckgo/autofill/dist/autofill.js b/node_modules/@duckduckgo/autofill/dist/autofill.js index e9bd2867c0b8..f8f0227688ec 100644 --- a/node_modules/@duckduckgo/autofill/dist/autofill.js +++ b/node_modules/@duckduckgo/autofill/dist/autofill.js @@ -3165,8 +3165,11 @@ var _InterfacePrototype = _interopRequireDefault(require("./InterfacePrototype.j var _autofillUtils = require("../autofill-utils.js"); var _NativeUIController = require("../UI/controllers/NativeUIController.js"); var _appleUtils = require("@duckduckgo/content-scope-scripts/src/apple-utils"); +var _InContextSignup = require("../InContextSignup.js"); +var _deviceApiCalls = require("../deviceApiCalls/__generated__/deviceApiCalls.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class AndroidInterface extends _InterfacePrototype.default { + inContextSignup = new _InContextSignup.InContextSignup(this); async isEnabled() { return (0, _autofillUtils.autofillEnabled)(this.globalConfig, _appleUtils.processConfig); } @@ -3177,7 +3180,20 @@ class AndroidInterface extends _InterfacePrototype.default { async getAlias() { const { alias - } = await (0, _autofillUtils.sendAndWaitForAnswer)(() => { + } = await (0, _autofillUtils.sendAndWaitForAnswer)(async () => { + if (this.inContextSignup.isAvailable()) { + const { + isSignedIn + } = await this.deviceApi.request(new _deviceApiCalls.ShowInContextEmailProtectionSignupPromptCall(null)); + // On Android we can't get the input type data again without + // refreshing the page, so instead we can mutate it now that we + // know the user has Email Protection available. + if (this.globalConfig.availableInputTypes) { + this.globalConfig.availableInputTypes.email = isSignedIn; + } + this.updateForStateChange(); + this.onFinishedAutofill(); + } return window.EmailInterface.showTooltip(); }, 'getAliasResponse'); return alias; @@ -3208,7 +3224,9 @@ class AndroidInterface extends _InterfacePrototype.default { // ...on other domains we assume true because the script wouldn't exist otherwise return true; } - async setupAutofill() {} + async setupAutofill() { + await this.inContextSignup.init(); + } /** * Used by the email web app @@ -3265,6 +3283,14 @@ class AndroidInterface extends _InterfacePrototype.default { } } } + + /** + * Used by the email web app + * Provides functionality to close the window after in-context sign-up or sign-in + */ + closeEmailProtection() { + this.deviceApi.request(new _deviceApiCalls.CloseEmailProtectionTabCall(null)); + } addLogoutListener(handler) { // Only deal with logging out if we're in the email web app if (!this.globalConfig.isDDGDomain) return; @@ -3280,7 +3306,7 @@ class AndroidInterface extends _InterfacePrototype.default { } exports.AndroidInterface = AndroidInterface; -},{"../UI/controllers/NativeUIController.js":46,"../autofill-utils.js":51,"./InterfacePrototype.js":17,"@duckduckgo/content-scope-scripts/src/apple-utils":1}],14:[function(require,module,exports){ +},{"../InContextSignup.js":34,"../UI/controllers/NativeUIController.js":46,"../autofill-utils.js":51,"../deviceApiCalls/__generated__/deviceApiCalls.js":55,"./InterfacePrototype.js":17,"@duckduckgo/content-scope-scripts/src/apple-utils":1}],14:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { @@ -5295,7 +5321,7 @@ function initFormSubmissionsApi(forms, matching) { const focusedForm = [...forms.values()].find(form => form.hasFocus(e)); focusedForm?.submitHandler('global keydown + Enter'); } - }); + }, true); /** * Global pointer down events @@ -12598,7 +12624,7 @@ const constants = exports.constants = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.StoreFormDataCall = exports.StartEmailProtectionSignupCall = exports.SetSizeCall = exports.SetIncontextSignupPermanentlyDismissedAtCall = exports.SendJSPixelCall = exports.SelectedDetailCall = exports.OpenManagePasswordsCall = exports.OpenManageIdentitiesCall = exports.OpenManageCreditCardsCall = exports.GetRuntimeConfigurationCall = exports.GetIncontextSignupDismissedAtCall = exports.GetAvailableInputTypesCall = exports.GetAutofillInitDataCall = exports.GetAutofillDataCall = exports.GetAutofillCredentialsCall = exports.EmailProtectionStoreUserDataCall = exports.EmailProtectionRemoveUserDataCall = exports.EmailProtectionRefreshPrivateAddressCall = exports.EmailProtectionGetUserDataCall = exports.EmailProtectionGetIsLoggedInCall = exports.EmailProtectionGetCapabilitiesCall = exports.EmailProtectionGetAddressesCall = exports.CloseEmailProtectionTabCall = exports.CloseAutofillParentCall = exports.CheckCredentialsProviderStatusCall = exports.AskToUnlockProviderCall = exports.AddDebugFlagCall = void 0; +exports.StoreFormDataCall = exports.StartEmailProtectionSignupCall = exports.ShowInContextEmailProtectionSignupPromptCall = exports.SetSizeCall = exports.SetIncontextSignupPermanentlyDismissedAtCall = exports.SendJSPixelCall = exports.SelectedDetailCall = exports.OpenManagePasswordsCall = exports.OpenManageIdentitiesCall = exports.OpenManageCreditCardsCall = exports.GetRuntimeConfigurationCall = exports.GetIncontextSignupDismissedAtCall = exports.GetAvailableInputTypesCall = exports.GetAutofillInitDataCall = exports.GetAutofillDataCall = exports.GetAutofillCredentialsCall = exports.EmailProtectionStoreUserDataCall = exports.EmailProtectionRemoveUserDataCall = exports.EmailProtectionRefreshPrivateAddressCall = exports.EmailProtectionGetUserDataCall = exports.EmailProtectionGetIsLoggedInCall = exports.EmailProtectionGetCapabilitiesCall = exports.EmailProtectionGetAddressesCall = exports.CloseEmailProtectionTabCall = exports.CloseAutofillParentCall = exports.CheckCredentialsProviderStatusCall = exports.AskToUnlockProviderCall = exports.AddDebugFlagCall = void 0; var _validatorsZod = require("./validators.zod.js"); var _deviceApi = require("../../../packages/device-api"); /* DO NOT EDIT, this file was generated by scripts/api-call-generator.js */ @@ -12827,7 +12853,16 @@ exports.StartEmailProtectionSignupCall = StartEmailProtectionSignupCall; class CloseEmailProtectionTabCall extends _deviceApi.DeviceApiCall { method = "closeEmailProtectionTab"; } +/** + * @extends {DeviceApiCall} + */ exports.CloseEmailProtectionTabCall = CloseEmailProtectionTabCall; +class ShowInContextEmailProtectionSignupPromptCall extends _deviceApi.DeviceApiCall { + method = "ShowInContextEmailProtectionSignupPrompt"; + id = "ShowInContextEmailProtectionSignupPromptResponse"; + resultValidator = _validatorsZod.showInContextEmailProtectionSignupPromptSchema; +} +exports.ShowInContextEmailProtectionSignupPromptCall = ShowInContextEmailProtectionSignupPromptCall; },{"../../../packages/device-api":2,"./validators.zod.js":56}],56:[function(require,module,exports){ "use strict"; @@ -12835,7 +12870,7 @@ exports.CloseEmailProtectionTabCall = CloseEmailProtectionTabCall; Object.defineProperty(exports, "__esModule", { value: true }); -exports.userPreferencesSchema = exports.triggerContextSchema = exports.storeFormDataSchema = exports.setSizeParamsSchema = exports.setIncontextSignupPermanentlyDismissedAtSchema = exports.sendJSPixelParamsSchema = exports.selectedDetailParamsSchema = exports.runtimeConfigurationSchema = exports.providerStatusUpdatedSchema = exports.outgoingCredentialsSchema = exports.getRuntimeConfigurationResponseSchema = exports.getIncontextSignupDismissedAtSchema = exports.getAvailableInputTypesResultSchema = exports.getAutofillInitDataResponseSchema = exports.getAutofillDataResponseSchema = exports.getAutofillDataRequestSchema = exports.getAutofillCredentialsResultSchema = exports.getAutofillCredentialsParamsSchema = exports.getAliasResultSchema = exports.getAliasParamsSchema = exports.genericErrorSchema = exports.generatedPasswordSchema = exports.emailProtectionStoreUserDataParamsSchema = exports.emailProtectionRefreshPrivateAddressResultSchema = exports.emailProtectionGetUserDataResultSchema = exports.emailProtectionGetIsLoggedInResultSchema = exports.emailProtectionGetCapabilitiesResultSchema = exports.emailProtectionGetAddressesResultSchema = exports.credentialsSchema = exports.contentScopeSchema = exports.checkCredentialsProviderStatusResultSchema = exports.availableInputTypesSchema = exports.availableInputTypes1Schema = exports.autofillSettingsSchema = exports.autofillFeatureTogglesSchema = exports.askToUnlockProviderResultSchema = exports.apiSchema = exports.addDebugFlagParamsSchema = void 0; +exports.userPreferencesSchema = exports.triggerContextSchema = exports.storeFormDataSchema = exports.showInContextEmailProtectionSignupPromptSchema = exports.setSizeParamsSchema = exports.setIncontextSignupPermanentlyDismissedAtSchema = exports.sendJSPixelParamsSchema = exports.selectedDetailParamsSchema = exports.runtimeConfigurationSchema = exports.providerStatusUpdatedSchema = exports.outgoingCredentialsSchema = exports.getRuntimeConfigurationResponseSchema = exports.getIncontextSignupDismissedAtSchema = exports.getAvailableInputTypesResultSchema = exports.getAutofillInitDataResponseSchema = exports.getAutofillDataResponseSchema = exports.getAutofillDataRequestSchema = exports.getAutofillCredentialsResultSchema = exports.getAutofillCredentialsParamsSchema = exports.getAliasResultSchema = exports.getAliasParamsSchema = exports.genericErrorSchema = exports.generatedPasswordSchema = exports.emailProtectionStoreUserDataParamsSchema = exports.emailProtectionRefreshPrivateAddressResultSchema = exports.emailProtectionGetUserDataResultSchema = exports.emailProtectionGetIsLoggedInResultSchema = exports.emailProtectionGetCapabilitiesResultSchema = exports.emailProtectionGetAddressesResultSchema = exports.credentialsSchema = exports.contentScopeSchema = exports.checkCredentialsProviderStatusResultSchema = exports.availableInputTypesSchema = exports.availableInputTypes1Schema = exports.autofillSettingsSchema = exports.autofillFeatureTogglesSchema = exports.askToUnlockProviderResultSchema = exports.apiSchema = exports.addDebugFlagParamsSchema = void 0; const sendJSPixelParamsSchema = exports.sendJSPixelParamsSchema = null; const addDebugFlagParamsSchema = exports.addDebugFlagParamsSchema = null; const getAutofillCredentialsParamsSchema = exports.getAutofillCredentialsParamsSchema = null; @@ -12846,6 +12881,7 @@ const getIncontextSignupDismissedAtSchema = exports.getIncontextSignupDismissedA const getAliasParamsSchema = exports.getAliasParamsSchema = null; const getAliasResultSchema = exports.getAliasResultSchema = null; const emailProtectionStoreUserDataParamsSchema = exports.emailProtectionStoreUserDataParamsSchema = null; +const showInContextEmailProtectionSignupPromptSchema = exports.showInContextEmailProtectionSignupPromptSchema = null; const generatedPasswordSchema = exports.generatedPasswordSchema = null; const triggerContextSchema = exports.triggerContextSchema = null; const credentialsSchema = exports.credentialsSchema = null; @@ -12938,6 +12974,23 @@ class AndroidTransport extends _index.DeviceApiTransport { if (deviceApiCall instanceof _deviceApiCalls.GetAvailableInputTypesCall) { return androidSpecificAvailableInputTypes(this.config); } + if (deviceApiCall instanceof _deviceApiCalls.GetIncontextSignupDismissedAtCall) { + window.BrowserAutofill.getIncontextSignupDismissedAt(JSON.stringify(deviceApiCall.params)); + return waitForResponse(deviceApiCall.id, this.config); + } + if (deviceApiCall instanceof _deviceApiCalls.SetIncontextSignupPermanentlyDismissedAtCall) { + return window.BrowserAutofill.setIncontextSignupPermanentlyDismissedAt(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.StartEmailProtectionSignupCall) { + return window.BrowserAutofill.startEmailProtectionSignup(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.CloseEmailProtectionTabCall) { + return window.BrowserAutofill.closeEmailProtectionTab(JSON.stringify(deviceApiCall.params)); + } + if (deviceApiCall instanceof _deviceApiCalls.ShowInContextEmailProtectionSignupPromptCall) { + window.BrowserAutofill.showInContextEmailProtectionSignupPrompt(JSON.stringify(deviceApiCall.params)); + return waitForResponse(deviceApiCall.id, this.config); + } if (deviceApiCall instanceof _deviceApiCalls.GetAutofillDataCall) { window.BrowserAutofill.getAutofillData(JSON.stringify(deviceApiCall.params)); return waitForResponse(deviceApiCall.id, this.config); diff --git a/package-lock.json b/package-lock.json index 3605ce1c49c4..a03d24c2f468 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "@duckduckgo/autoconsent": "^5.1.0", - "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#8.4.2", + "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#9.0.0", "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#4.39.0", "@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#1.7.0", "@duckduckgo/privacy-reference-tests": "github:duckduckgo/privacy-reference-tests#1692081744" @@ -64,7 +64,7 @@ "integrity": "sha512-/ZUdNt+FLhtT40f53Pl/TwOLX1Rr4vCyzgDXQjtXBHF7vSaQJLRdkDkiEm4P24HAxNbg+WGeleJUiIEyQgfp2A==" }, "node_modules/@duckduckgo/autofill": { - "resolved": "git+ssh://git@github.com/duckduckgo/duckduckgo-autofill.git#6dd7d696d4e666cedb2f1890a46fe53615226646", + "resolved": "git+ssh://git@github.com/duckduckgo/duckduckgo-autofill.git#c8e895c8fd50dc76e8d8dc827a636ad77b7f46ff", "hasInstallScript": true, "license": "Apache-2.0" }, diff --git a/package.json b/package.json index 83d1487cae72..effc1de4e86f 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@duckduckgo/autoconsent": "^5.1.0", - "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#8.4.2", + "@duckduckgo/autofill": "github:duckduckgo/duckduckgo-autofill#9.0.0", "@duckduckgo/content-scope-scripts": "github:duckduckgo/content-scope-scripts#4.39.0", "@duckduckgo/privacy-dashboard": "github:duckduckgo/privacy-dashboard#1.7.0", "@duckduckgo/privacy-reference-tests": "github:duckduckgo/privacy-reference-tests#1692081744"