OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
Tyler Breisacher (Chromium)
2015/04/24 17:42:55
lgtm for this file since it's auto-generated anywa
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 /** @fileoverview Externs generated from namespace: autofillPrivate */ | |
6 | |
7 /** | |
8 * @const | |
9 */ | |
10 chrome.autofillPrivate = {}; | |
11 | |
12 /** | |
13 * @enum {string} | |
14 * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressFiel d | |
15 */ | |
16 chrome.autofillPrivate.AddressField = { | |
17 FULL_NAME: 'FULL_NAME', | |
18 COMPANY_NAME: 'COMPANY_NAME', | |
19 ADDRESS_LINES: 'ADDRESS_LINES', | |
20 ADDRESS_LEVEL_1: 'ADDRESS_LEVEL_1', | |
21 ADDRESS_LEVEL_2: 'ADDRESS_LEVEL_2', | |
22 ADDRESS_LEVEL_3: 'ADDRESS_LEVEL_3', | |
23 POSTAL_CODE: 'POSTAL_CODE', | |
24 SORTING_CODE: 'SORTING_CODE', | |
25 COUNTRY_CODE: 'COUNTRY_CODE', | |
26 }; | |
27 | |
28 /** | |
29 * @typedef {{ | |
30 * summaryLabel: string, | |
31 * summarySublabel: (string|undefined), | |
32 * isLocal: (boolean|undefined), | |
33 * isCached: (boolean|undefined) | |
34 * }} | |
35 * @see https://developer.chrome.com/extensions/autofillPrivate#type-AutofillMet adata | |
36 */ | |
37 var AutofillMetadata; | |
38 | |
39 /** | |
40 * @typedef {{ | |
41 * guid: (string|undefined), | |
42 * fullNames: (!Array<string>|undefined), | |
43 * companyName: (string|undefined), | |
44 * addressLines: (string|undefined), | |
45 * addressLevel1: (string|undefined), | |
46 * addressLevel2: (string|undefined), | |
47 * addressLevel3: (string|undefined), | |
48 * postalCode: (string|undefined), | |
49 * sortingCode: (string|undefined), | |
50 * country: (string|undefined), | |
51 * phoneNumbers: (!Array<string>|undefined), | |
52 * emailAddresses: (!Array<string>|undefined), | |
53 * languageCode: (string|undefined), | |
54 * metadata: (AutofillMetadata|undefined) | |
55 * }} | |
56 * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressEntr y | |
57 */ | |
58 var AddressEntry; | |
59 | |
60 /** | |
61 * @typedef {{ | |
62 * field: !chrome.autofillPrivate.AddressField, | |
63 * fieldName: string, | |
64 * isLongField: boolean | |
65 * }} | |
66 * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressComp onent | |
67 */ | |
68 var AddressComponent; | |
69 | |
70 /** | |
71 * @typedef {{ | |
72 * components: !Array<AddressComponent>, | |
73 * languageCode: string | |
74 * }} | |
75 * @see https://developer.chrome.com/extensions/autofillPrivate#type-AddressComp onents | |
76 */ | |
77 var AddressComponents; | |
78 | |
79 /** | |
80 * @typedef {{ | |
81 * guid: (string|undefined), | |
82 * cardNumber: (string|undefined), | |
83 * expirationMonth: (number|undefined), | |
84 * expirationYear: (number|undefined), | |
85 * metadata: (AutofillMetadata|undefined) | |
86 * }} | |
87 * @see https://developer.chrome.com/extensions/autofillPrivate#type-CreditCardE ntry | |
88 */ | |
89 var CreditCardEntry; | |
90 | |
91 /** | |
92 * @typedef {{ | |
93 * phoneNumbers: !Array<string>, | |
94 * indexOfNewNumber: number, | |
95 * countryCode: string | |
96 * }} | |
97 * @see https://developer.chrome.com/extensions/autofillPrivate#type-ValidatePho neParams | |
98 */ | |
99 var ValidatePhoneParams; | |
100 | |
101 /** | |
102 * Saves the given address. If |address| has an empty string as its ID, it will | |
103 * be assigned a new one and added as a new entry. | |
104 * @param {AddressEntry} address The address entry to save. | |
105 * @see https://developer.chrome.com/extensions/autofillPrivate#method-saveAddre ss | |
106 */ | |
107 chrome.autofillPrivate.saveAddress = function(address) {}; | |
108 | |
109 /** | |
110 * Gets the address components for a given country code. | |
111 * @param {string} countryCode The country code for which to fetch the | |
112 * components. | |
113 * @param {function(AddressComponents):void} callback Callback which will be | |
114 * called with components. | |
115 * @see https://developer.chrome.com/extensions/autofillPrivate#method-getAddres sComponents | |
116 */ | |
117 chrome.autofillPrivate.getAddressComponents = function(countryCode, callback) {} ; | |
118 | |
119 /** | |
120 * Saves the given credit card. If |card| has an empty string as its ID, it will | |
121 * be assigned a new one and added as a new entry. | |
122 * @param {CreditCardEntry} card The card entry to save. | |
123 * @see https://developer.chrome.com/extensions/autofillPrivate#method-saveCredi tCard | |
124 */ | |
125 chrome.autofillPrivate.saveCreditCard = function(card) {}; | |
126 | |
127 /** | |
128 * Removes the entry (address or credit card) with the given ID. | |
129 * @param {string} guid ID of the entry to remove. | |
130 * @see https://developer.chrome.com/extensions/autofillPrivate#method-removeEnt ry | |
131 */ | |
132 chrome.autofillPrivate.removeEntry = function(guid) {}; | |
133 | |
134 /** | |
135 * Validates a newly-added phone number and invokes the callback with a list of | |
136 * validated numbers. Note that if the newly-added number was invalid, it will | |
137 * not be returned in the list of valid numbers. | |
138 * @param {ValidatePhoneParams} params The parameters to this function. | |
139 * @param {function(!Array<string>):void} callback Callback which will be called | |
140 * with validated phone numbers. | |
141 * @return {!Array<string>} | |
142 * @see https://developer.chrome.com/extensions/autofillPrivate#method-validateP honeNumbers | |
143 */ | |
144 chrome.autofillPrivate.validatePhoneNumbers = function(params, callback) {}; | |
145 | |
146 /** | |
147 * Clears the data associated with a wallet card which was saved locally so that | |
148 * the saved copy is masked (e.g., "Card ending in 1234"). | |
149 * @param {string} guid GUID of the credit card to mask. | |
150 * @see https://developer.chrome.com/extensions/autofillPrivate#method-maskCredi tCard | |
151 */ | |
152 chrome.autofillPrivate.maskCreditCard = function(guid) {}; | |
153 | |
154 /** | |
155 * Fired when the address list has changed, meaning that an entry has been | |
156 * added, removed, or changed. |entries| The updated list of entries. | |
157 * @type {!ChromeEvent} | |
158 * @see https://developer.chrome.com/extensions/autofillPrivate#event-onAddressL istChanged | |
159 */ | |
160 chrome.autofillPrivate.onAddressListChanged; | |
161 | |
162 /** | |
163 * Fired when the credit card list has changed, meaning that an entry has been | |
164 * added, removed, or changed. |entries| The updated list of entries. | |
165 * @type {!ChromeEvent} | |
166 * @see https://developer.chrome.com/extensions/autofillPrivate#event-onCreditCa rdListChanged | |
167 */ | |
168 chrome.autofillPrivate.onCreditCardListChanged; | |
169 | |
170 | |
OLD | NEW |