-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconsts.ts
337 lines (332 loc) · 8.96 KB
/
consts.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
// +++++++++++++++
// +++ General +++
// +++++++++++++++
// The old web UI had a dropdown that listed these categories. That doesn't appear to be the case anymore…
// To generate, run the following in the browser console on
// <https://web.archive.org/web/20220515000031/https://play.google.com/store/apps/>:
// Array.from(document.querySelectorAll('#action-dropdown-children-Categories .TEOqAc a')).reduce((acc, cur) =>
// ({...acc, [cur.href.match(/\/([^\/]+?)$/)[1]]: cur.innerText}), {})
/**
* A category on the Play Store.
*
* @enum
*/
export const categories = {
APPLICATION: 'Applications',
GAME: 'Games',
ART_AND_DESIGN: 'Art & Design',
AUTO_AND_VEHICLES: 'Auto & Vehicles',
BEAUTY: 'Beauty',
BOOKS_AND_REFERENCE: 'Books & Reference',
BUSINESS: 'Business',
COMICS: 'Comics',
COMMUNICATION: 'Communication',
DATING: 'Dating',
EDUCATION: 'Education',
ENTERTAINMENT: 'Entertainment',
EVENTS: 'Events',
FINANCE: 'Finance',
FOOD_AND_DRINK: 'Food & Drink',
HEALTH_AND_FITNESS: 'Health & Fitness',
HOUSE_AND_HOME: 'House & Home',
LIBRARIES_AND_DEMO: 'Libraries & Demo',
LIFESTYLE: 'Lifestyle',
MAPS_AND_NAVIGATION: 'Maps & Navigation',
MEDICAL: 'Medical',
MUSIC_AND_AUDIO: 'Music & Audio',
NEWS_AND_MAGAZINES: 'News & Magazines',
PARENTING: 'Parenting',
PERSONALIZATION: 'Personalization',
PHOTOGRAPHY: 'Photography',
PRODUCTIVITY: 'Productivity',
SHOPPING: 'Shopping',
SOCIAL: 'Social',
SPORTS: 'Sports',
TOOLS: 'Tools',
TRAVEL_AND_LOCAL: 'Travel & Local',
VIDEO_PLAYERS: 'Video Players & Editors',
ANDROID_WEAR: 'Watch apps',
WATCH_FACE: 'Watch faces',
WEATHER: 'Weather',
GAME_ACTION: 'Action',
GAME_ADVENTURE: 'Adventure',
GAME_ARCADE: 'Arcade',
GAME_BOARD: 'Board',
GAME_CARD: 'Card',
GAME_CASINO: 'Casino',
GAME_CASUAL: 'Casual',
GAME_EDUCATIONAL: 'Educational',
GAME_MUSIC: 'Music',
GAME_PUZZLE: 'Puzzle',
GAME_RACING: 'Racing',
GAME_ROLE_PLAYING: 'Role Playing',
GAME_SIMULATION: 'Simulation',
GAME_SPORTS: 'Sports',
GAME_STRATEGY: 'Strategy',
GAME_TRIVIA: 'Trivia',
GAME_WORD: 'Word',
FAMILY: 'Kids',
} as const;
/**
* The ID of a category on the Play Store.
*/
export type CategoryId = keyof typeof categories;
// To generate, go to <https://play.google.com/store/apps>, open the country modal from the footer, and then run the
// following in the browser console:
// Array.from(document.querySelectorAll('ul.P2Hi5d.DMZ54e.bwNLcf li.xoKNSc')).reduce((acc, cur) => ({...acc,
// [cur.dataset.gl]: cur.innerText}), {})
/**
* A country supported by the Play Store.
*
* @enum
*/
export const countries = {
AX: 'Åland Islands',
AT: 'Austria',
BE: 'Belgium',
BG: 'Bulgaria',
HR: 'Croatia',
CY: 'Cyprus',
CZ: 'Czechia',
DK: 'Denmark',
EE: 'Estonia',
FO: 'Faroe Islands',
FI: 'Finland',
FR: 'France',
GF: 'French Guiana',
PF: 'French Polynesia',
DE: 'Germany',
GI: 'Gibraltar',
GR: 'Greece',
GL: 'Greenland',
GP: 'Guadeloupe',
HU: 'Hungary',
IS: 'Iceland',
IE: 'Ireland',
IT: 'Italy',
LV: 'Latvia',
LI: 'Liechtenstein',
LT: 'Lithuania',
LU: 'Luxembourg',
MT: 'Malta',
MQ: 'Martinique',
YT: 'Mayotte',
MC: 'Monaco',
NL: 'Netherlands',
NC: 'New Caledonia',
NO: 'Norway',
PL: 'Poland',
PT: 'Portugal',
RE: 'Réunion',
RO: 'Romania',
SM: 'San Marino',
SK: 'Slovakia',
SI: 'Slovenia',
ES: 'Spain',
BL: 'St. Barthélemy',
MF: 'St. Martin',
PM: 'St. Pierre & Miquelon',
SJ: 'Svalbard & Jan Mayen',
SE: 'Sweden',
GB: 'United Kingdom',
VA: 'Vatican City',
WF: 'Wallis & Futuna',
} as const;
/**
* The country code of a country supported on the Play Store.
*/
export type CountryCode = keyof typeof countries;
// To generate, go to <https://developers.google.com/custom-search/docs/xml_results_appendices>, and run the following
// in the browser console:
// Array.from(document.querySelector('#supported-interface-languages ~
// div.devsite-table-wrapper').querySelectorAll('tr')).slice(1).reduce((acc, cur) => ({...acc,
// [cur.children.item(1).innerText.toUpperCase()]: cur.children.item(0).innerText}), {})
/**
* A language supported by the Play Store.
*
* @enum
*/
export const languages = {
AF: 'Afrikaans',
SQ: 'Albanian',
SM: 'Amharic',
AR: 'Arabic',
AZ: 'Azerbaijani',
EU: 'Basque',
BE: 'Belarusian',
BN: 'Bengali',
BH: 'Bihari',
BS: 'Bosnian',
BG: 'Bulgarian',
CA: 'Catalan',
'ZH-CN': 'Chinese (Simplified)',
'ZH-TW': 'Chinese (Traditional)',
HR: 'Croatian',
CS: 'Czech',
DA: 'Danish',
NL: 'Dutch',
EN: 'English',
EO: 'Esperanto',
ET: 'Estonian',
FO: 'Faroese',
FI: 'Finnish',
FR: 'French',
FY: 'Frisian',
GL: 'Galician',
KA: 'Georgian',
DE: 'German',
EL: 'Greek',
GU: 'Gujarati',
IW: 'Hebrew',
HI: 'Hindi',
HU: 'Hungarian',
IS: 'Icelandic',
ID: 'Indonesian',
IA: 'Interlingua',
GA: 'Irish',
IT: 'Italian',
JA: 'Japanese',
JW: 'Javanese',
KN: 'Kannada',
KO: 'Korean',
LA: 'Latin',
LV: 'Latvian',
LT: 'Lithuanian',
MK: 'Macedonian',
MS: 'Malay',
ML: 'Malayam',
MT: 'Maltese',
MR: 'Marathi',
NE: 'Nepali',
NO: 'Norwegian',
NN: 'Norwegian (Nynorsk)',
OC: 'Occitan',
FA: 'Persian',
PL: 'Polish',
'PT-BR': 'Portuguese (Brazil)',
'PT-PT': 'Portuguese (Portugal)',
PA: 'Punjabi',
RO: 'Romanian',
RU: 'Russian',
GD: 'Scots Gaelic',
SR: 'Serbian',
SI: 'Sinhalese',
SK: 'Slovak',
SL: 'Slovenian',
ES: 'Spanish',
SU: 'Sudanese',
SW: 'Swahili',
SV: 'Swedish',
TL: 'Tagalog',
TA: 'Tamil',
TE: 'Telugu',
TH: 'Thai',
TI: 'Tigrinya',
TR: 'Turkish',
UK: 'Ukrainian',
UR: 'Urdu',
UZ: 'Uzbek',
VI: 'Vietnamese',
CY: 'Welsh',
XH: 'Xhosa',
ZU: 'Zulu',
} as const;
/**
* The language code of a language supported on the Play Store.
*/
export type LanguageCode = keyof typeof languages;
// ++++++++++++++++++++++++++
// +++ Data safety labels +++
// ++++++++++++++++++++++++++
/**
* The categories that group multiple related data types in a data safety label.
*
* Taken from the official documentation: <https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cdata-types>
*/
export const dataSafetyLabelDataCategories = [
'App activity',
'App info and performance',
'Audio files',
'Calendar',
'Contacts',
'Device or other IDs',
'Files and docs',
'Financial info',
'Health and fitness',
'Location',
'Messages',
'Personal info',
'Photos and videos',
'Web browsing',
] as const;
/**
* A category that groups multiple related data types in a data safety label.
*/
export type DataSafetyLabelDataCategory = typeof dataSafetyLabelDataCategories[number];
/**
* The types of data that can be declared in a data safety label.
*
* Taken from the official documentation: <https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cdata-types>
*/
export const dataSafetyLabelDataTypes = [
'Approximate location',
'Precise location',
'Name',
'Email address',
'User IDs',
'Address',
'Phone number',
'Race and ethnicity',
'Political or religious beliefs',
'Sexual orientation',
'Other info',
'User payment info',
'Purchase history',
'Credit score',
'Other financial info',
'Health info',
'Fitness info',
'Emails',
'SMS or MMS',
'Other in-app messages',
'Photos',
'Videos',
'Voice or sound recordings',
'Music files',
'Other audio files',
'Files and docs',
'Calendar events',
'Contacts',
'App interactions',
'In-app search history',
'Installed apps',
'Other user-generated content',
'Other actions',
'Web browsing history',
'Crash logs',
'Diagnostics',
'Other app performance data',
'Device or other IDs',
] as const;
/**
* A type of data that can be declared in a data safety label.
*/
export type DataSafetyLabelDataType = typeof dataSafetyLabelDataTypes[number];
/**
* The purposes for which data collection or sharing can be declared in a data safety label.
*
* Taken from the official documentation: <https://web.archive.org/web/20220701122426/https://support.google.com/googleplay/android-developer/answer/10787469#zippy=%2Cpurposes>
*/
export const dataSafetyLabelPurposes = [
'App functionality',
'Analytics',
'Developer communications',
'Advertising or marketing',
'Fraud prevention, security, and compliance',
'Personalization',
'Account management',
] as const;
/**
* A purpose for which data collection or sharing can be declared in a data safety label.
*/
export type DataSafetyLabelPurpose = typeof dataSafetyLabelPurposes[number];