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