morphiaone 0.2.2__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: morphiaone
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: Python SDK for the MorphiaOne V1 API (Developer Preview): Skin Analysis, Makeup Try-On and Hair Color Try-On.
5
5
  Author: MorphiaOne
6
6
  License-Expression: MIT
@@ -30,8 +30,7 @@ Try-On and Hair Color Try-On, plus the Assets, Jobs and Usage calls they rest on
30
30
 
31
31
  > **Developer Preview.** The V1 API contract is release candidate `1.0.0-rc.1`, still a
32
32
  > draft, and this SDK may change before 1.0, including in ways that break code written
33
- > against it. Pin an exact version. `0.1.0` is published; this source tree is `0.2.2`,
34
- > which is not published until its release is approved.
33
+ > against it. Pin an exact version. `0.2.2` is the current published version.
35
34
 
36
35
  ## Install
37
36
 
@@ -5,8 +5,7 @@ Try-On and Hair Color Try-On, plus the Assets, Jobs and Usage calls they rest on
5
5
 
6
6
  > **Developer Preview.** The V1 API contract is release candidate `1.0.0-rc.1`, still a
7
7
  > draft, and this SDK may change before 1.0, including in ways that break code written
8
- > against it. Pin an exact version. `0.1.0` is published; this source tree is `0.2.2`,
9
- > which is not published until its release is approved.
8
+ > against it. Pin an exact version. `0.2.2` is the current published version.
10
9
 
11
10
  ## Install
12
11
 
@@ -0,0 +1,453 @@
1
+ # Generated by scripts/generate_sdk_vto_mapping.py; do not edit.
2
+ # config/makeup-mapping.json sha256 d83fdfd8a027806d24c69b4189ba786acaf53857653473ad861b73095890145c
3
+ # config/makeup-textures.json sha256 80c4c7e6951f75116ac2137fcdc5ed2f3733a5139b49a15e272b8b3d337c8cf7
4
+ # config/public-makeup-categories.json sha256 6bfc4633f16cd70f8407725729b975968dd02464d002520775a13f66864ffa62
5
+ """The VTO import mapping table (data only; see `morphiaone.vto_import`)."""
6
+
7
+ # fmt: off
8
+ MAPPING = {'categories': {'blush': {'fields': {'color': {'bounds': None,
9
+ 'doc_default': None,
10
+ 'native_path': 'colors[0].color',
11
+ 'transform': 'identity'},
12
+ 'glitter.opacity': {'bounds': [0, 1],
13
+ 'doc_default': 1.0,
14
+ 'native_path': 'config.glitter_opacity',
15
+ 'number': 'float',
16
+ 'transform': 'identity'},
17
+ 'glitter.texture': {'bounds': None,
18
+ 'doc_default': None,
19
+ 'native_path': 'texturesToApply[1]',
20
+ 'sets': {'config.is_glitter': True},
21
+ 'transform': 'texture_native_id'},
22
+ 'opacity': {'bounds': [0, 1],
23
+ 'doc_default': 1.0,
24
+ 'native_path': 'colors[0].opacity',
25
+ 'number': 'float',
26
+ 'transform': 'identity'},
27
+ 'texture': {'bounds': None,
28
+ 'doc_default': None,
29
+ 'native_path': 'texturesToApply[0]',
30
+ 'transform': 'texture_native_id'}},
31
+ 'native_type': 1,
32
+ 'sub_type_field': None},
33
+ 'bronzer': {'fields': {'color': {'bounds': None,
34
+ 'doc_default': None,
35
+ 'native_path': 'colors[0].color',
36
+ 'transform': 'identity'},
37
+ 'opacity': {'bounds': [0, 1],
38
+ 'doc_default': 1.0,
39
+ 'native_path': 'colors[0].opacity',
40
+ 'number': 'float',
41
+ 'transform': 'identity'},
42
+ 'texture': {'bounds': None,
43
+ 'doc_default': None,
44
+ 'native_path': 'texturesToApply[0]',
45
+ 'transform': 'texture_native_id'}},
46
+ 'native_type': 13,
47
+ 'sub_type_field': None},
48
+ 'concealer': {'fields': {'color': {'bounds': None,
49
+ 'doc_default': None,
50
+ 'native_path': 'colors[0].color',
51
+ 'transform': 'identity'},
52
+ 'coverage': {'bounds': [0, 1.5],
53
+ 'doc_default': 1.0,
54
+ 'native_path': 'config.coverage_rate',
55
+ 'number': 'float',
56
+ 'transform': 'identity'},
57
+ 'opacity': {'bounds': [0, 1],
58
+ 'doc_default': 1.0,
59
+ 'native_path': 'colors[0].opacity',
60
+ 'number': 'float',
61
+ 'transform': 'identity'},
62
+ 'texture': {'bounds': None,
63
+ 'doc_default': None,
64
+ 'native_path': 'texturesToApply[0]',
65
+ 'transform': 'texture_native_id'}},
66
+ 'native_type': 12,
67
+ 'sub_type_field': None},
68
+ 'contour': {'fields': {'color': {'bounds': None,
69
+ 'doc_default': None,
70
+ 'native_path': 'colors[0].color',
71
+ 'transform': 'identity'},
72
+ 'opacity': {'bounds': [0, 1],
73
+ 'doc_default': 1.0,
74
+ 'native_path': 'colors[0].opacity',
75
+ 'number': 'float',
76
+ 'transform': 'identity'},
77
+ 'texture': {'bounds': None,
78
+ 'doc_default': None,
79
+ 'native_path': 'texturesToApply[0]',
80
+ 'transform': 'texture_native_id'}},
81
+ 'native_type': 2,
82
+ 'sub_type_field': None},
83
+ 'eyebrow': {'fields': {'color': {'bounds': None,
84
+ 'doc_default': None,
85
+ 'native_path': 'colors[0].color',
86
+ 'transform': 'identity'},
87
+ 'opacity': {'bounds': [0, 1],
88
+ 'doc_default': 1.0,
89
+ 'native_path': 'colors[0].opacity',
90
+ 'number': 'float',
91
+ 'transform': 'identity'},
92
+ 'style': {'bounds': None,
93
+ 'doc_default': 'pomade_pencil',
94
+ 'native_path': 'subType',
95
+ 'transform': 'enum',
96
+ 'values': {'liner': 2,
97
+ 'mascara_fix': 1,
98
+ 'micro_marker': 3,
99
+ 'pomade_pencil': 0}},
100
+ 'texture': {'bounds': None,
101
+ 'doc_default': None,
102
+ 'native_path': 'texturesToApply[0]',
103
+ 'transform': 'texture_native_id'}},
104
+ 'native_type': 10,
105
+ 'sub_type_field': 'style'},
106
+ 'eyeliner': {'fields': {'color': {'bounds': None,
107
+ 'doc_default': None,
108
+ 'native_path': 'colors[0].color',
109
+ 'transform': 'identity'},
110
+ 'opacity': {'bounds': [0, 1],
111
+ 'doc_default': 1.0,
112
+ 'native_path': 'colors[0].opacity',
113
+ 'number': 'float',
114
+ 'transform': 'identity'},
115
+ 'style': {'bounds': None,
116
+ 'doc_default': 'normal',
117
+ 'native_path': 'subType',
118
+ 'transform': 'enum',
119
+ 'values': {'dark_matte': 1,
120
+ 'normal': 0}},
121
+ 'texture': {'bounds': None,
122
+ 'doc_default': None,
123
+ 'native_path': 'texturesToApply[0]',
124
+ 'transform': 'texture_native_id'}},
125
+ 'native_type': 4,
126
+ 'sub_type_field': 'style'},
127
+ 'eyeshadow': {'fields': {'shades[].color': {'bounds': None,
128
+ 'doc_default': None,
129
+ 'native_path': 'colors[].color',
130
+ 'transform': 'identity'},
131
+ 'shades[].opacity': {'bounds': [0, 1],
132
+ 'doc_default': 1.0,
133
+ 'native_path': 'colors[].opacity',
134
+ 'number': 'float',
135
+ 'transform': 'identity'},
136
+ 'texture': {'bounds': None,
137
+ 'doc_default': None,
138
+ 'native_path': 'texturesToApply[0]',
139
+ 'transform': 'texture_native_id'}},
140
+ 'native_type': 3,
141
+ 'sub_type_field': None},
142
+ 'foundation': {'fields': {'color': {'bounds': None,
143
+ 'doc_default': None,
144
+ 'native_path': 'colors[0].color',
145
+ 'transform': 'identity'},
146
+ 'coverage': {'bounds': [0, 1.5],
147
+ 'doc_default': 1.0,
148
+ 'native_path': 'config.coverage_rate',
149
+ 'number': 'float',
150
+ 'transform': 'identity'},
151
+ 'coverage_face_blur': {'bounds': [0.5, 1.5],
152
+ 'doc_default': 1.0,
153
+ 'native_path': 'config.covarage_rate_face_blur',
154
+ 'number': 'float',
155
+ 'transform': 'identity'},
156
+ 'coverage_opacity': {'bounds': [0.5, 1.5],
157
+ 'doc_default': 1.0,
158
+ 'native_path': 'config.covarage_rate_opacity',
159
+ 'number': 'float',
160
+ 'transform': 'identity'},
161
+ 'finish': {'bounds': None,
162
+ 'doc_default': 'natural',
163
+ 'native_path': 'subType',
164
+ 'transform': 'enum',
165
+ 'values': {'bright': 1,
166
+ 'natural': 0}},
167
+ 'opacity': {'bounds': [0, 1],
168
+ 'doc_default': 1.0,
169
+ 'native_path': 'colors[0].opacity',
170
+ 'number': 'float',
171
+ 'transform': 'identity'}},
172
+ 'native_type': 0,
173
+ 'sub_type_field': 'finish'},
174
+ 'fun_mask': {'fields': {'opacity': {'bounds': [0, 1],
175
+ 'doc_default': 1.0,
176
+ 'native_path': 'colors[0].opacity',
177
+ 'number': 'float',
178
+ 'transform': 'identity'},
179
+ 'texture': {'bounds': None,
180
+ 'doc_default': None,
181
+ 'native_path': 'texturesToApply[0]',
182
+ 'transform': 'texture_native_id'}},
183
+ 'fixed': {'colors[0].color': '#000000'},
184
+ 'native_type': 11,
185
+ 'sub_type_field': None},
186
+ 'highlighter': {'fields': {'color': {'bounds': None,
187
+ 'doc_default': None,
188
+ 'native_path': 'colors[0].color',
189
+ 'transform': 'identity'},
190
+ 'colored': {'bounds': None,
191
+ 'doc_default': False,
192
+ 'native_path': 'config.isColored',
193
+ 'transform': 'bool'},
194
+ 'intensity': {'bounds': [0, 100],
195
+ 'doc_default': 50,
196
+ 'native_path': 'config.opacityOfHighlighter',
197
+ 'number': 'integer',
198
+ 'transform': 'identity'},
199
+ 'light_control': {'bounds': [0, 100],
200
+ 'doc_default': 50,
201
+ 'native_path': 'config.lightControl',
202
+ 'number': 'integer',
203
+ 'transform': 'identity'},
204
+ 'opacity': {'bounds': [0, 1],
205
+ 'doc_default': 1.0,
206
+ 'native_path': 'colors[0].opacity',
207
+ 'number': 'float',
208
+ 'transform': 'identity'},
209
+ 'reflectance_control': {'bounds': [0, 100],
210
+ 'doc_default': 50,
211
+ 'native_path': 'config.reflectanceControl',
212
+ 'number': 'integer',
213
+ 'transform': 'identity'},
214
+ 'silvery': {'bounds': None,
215
+ 'doc_default': False,
216
+ 'native_path': 'config.isSilvery',
217
+ 'transform': 'bool'},
218
+ 'silvery_opacity': {'bounds': [0, 1],
219
+ 'doc_default': 0.5,
220
+ 'native_path': 'config.opacityOfSilvery',
221
+ 'number': 'float',
222
+ 'transform': 'identity'},
223
+ 'texture': {'bounds': None,
224
+ 'doc_default': None,
225
+ 'native_path': 'texturesToApply[0]',
226
+ 'transform': 'texture_native_id'}},
227
+ 'native_type': 6,
228
+ 'sub_type_field': None},
229
+ 'lip_liner': {'fields': {'color': {'bounds': None,
230
+ 'doc_default': None,
231
+ 'native_path': 'colors[0].color',
232
+ 'transform': 'identity'},
233
+ 'lower_lip_offset': {'bounds': [0, 1],
234
+ 'doc_default': 0.0,
235
+ 'native_path': 'config.lower_lip_offset',
236
+ 'number': 'float',
237
+ 'transform': 'identity'},
238
+ 'opacity': {'bounds': [0, 1],
239
+ 'doc_default': 1.0,
240
+ 'native_path': 'colors[0].opacity',
241
+ 'number': 'float',
242
+ 'transform': 'identity'},
243
+ 'thickness': {'bounds': [0, 1],
244
+ 'doc_default': 0.0,
245
+ 'native_path': 'config.thickness',
246
+ 'number': 'float',
247
+ 'transform': 'identity'},
248
+ 'upper_lip_offset': {'bounds': [0, 1],
249
+ 'doc_default': 0.0,
250
+ 'native_path': 'config.upper_lip_offset',
251
+ 'number': 'float',
252
+ 'transform': 'identity'},
253
+ 'wideness': {'bounds': [0, 1],
254
+ 'doc_default': 0.0,
255
+ 'native_path': 'config.wideness',
256
+ 'number': 'float',
257
+ 'transform': 'identity'}},
258
+ 'native_type': 9,
259
+ 'sub_type_field': None},
260
+ 'lipstick': {'fields': {'color': {'bounds': None,
261
+ 'doc_default': None,
262
+ 'native_path': 'colors[0].color',
263
+ 'transform': 'identity'},
264
+ 'finish': {'bounds': None,
265
+ 'doc_default': 'matte',
266
+ 'native_path': 'subType',
267
+ 'transform': 'enum',
268
+ 'values': {'gloss': 1,
269
+ 'matte': 0,
270
+ 'metallic': 2}},
271
+ 'look': {'bounds': None,
272
+ 'doc_default': 'full',
273
+ 'native_path': 'config.lipstick_look_type',
274
+ 'transform': 'enum',
275
+ 'values': {'full': 'NORMAL',
276
+ 'ombre': 'OMBRE'}},
277
+ 'ombre.color': {'bounds': None,
278
+ 'doc_default': None,
279
+ 'native_path': 'colors[1].color',
280
+ 'transform': 'identity'},
281
+ 'ombre.opacity': {'bounds': [0, 1],
282
+ 'doc_default': 1.0,
283
+ 'native_path': 'colors[1].opacity',
284
+ 'number': 'float',
285
+ 'transform': 'identity'},
286
+ 'opacity': {'bounds': [0, 1],
287
+ 'doc_default': 1.0,
288
+ 'native_path': 'colors[0].opacity',
289
+ 'number': 'float',
290
+ 'transform': 'identity'},
291
+ 'shading.darkness_opacity': {'bounds': [0, 1],
292
+ 'doc_default': 0.8,
293
+ 'native_path': 'config.darkness_opacity',
294
+ 'number': 'float',
295
+ 'transform': 'identity'},
296
+ 'shading.darkness_smooth': {'bounds': [0, 4],
297
+ 'doc_default': 1,
298
+ 'native_path': 'config.darkness_smooth',
299
+ 'number': 'integer',
300
+ 'transform': 'identity'},
301
+ 'shading.lightness_opacity': {'bounds': [0, 1],
302
+ 'doc_default': 0.4,
303
+ 'native_path': 'config.lightness_opacity',
304
+ 'number': 'float',
305
+ 'transform': 'identity'},
306
+ 'shading.lightness_smooth': {'bounds': [0, 4],
307
+ 'doc_default': 2,
308
+ 'native_path': 'config.lightness_smooth',
309
+ 'number': 'integer',
310
+ 'transform': 'identity'},
311
+ 'shading.reflectance': {'bounds': [0, 1],
312
+ 'doc_default': 0.9,
313
+ 'native_path': 'config.reflectance',
314
+ 'number': 'float',
315
+ 'transform': 'identity'},
316
+ 'shading.reflectance_opacity': {'bounds': [0,
317
+ 1],
318
+ 'doc_default': 0.24,
319
+ 'native_path': 'config.reflectance_opacity',
320
+ 'number': 'float',
321
+ 'transform': 'identity'}},
322
+ 'native_type': 8,
323
+ 'sub_type_field': 'finish'},
324
+ 'mascara': {'fields': {'color': {'bounds': None,
325
+ 'doc_default': None,
326
+ 'native_path': 'colors[0].color',
327
+ 'transform': 'identity'},
328
+ 'opacity': {'bounds': [0, 1],
329
+ 'doc_default': 1.0,
330
+ 'native_path': 'colors[0].opacity',
331
+ 'number': 'float',
332
+ 'transform': 'identity'},
333
+ 'style': {'bounds': None,
334
+ 'doc_default': 'volume',
335
+ 'native_path': 'config.mascaraType',
336
+ 'transform': 'enum',
337
+ 'values': {'curl': 1,
338
+ 'curl_length': 5,
339
+ 'length': 2,
340
+ 'volume': 0,
341
+ 'volume_curl': 3,
342
+ 'volume_curl_length': 6,
343
+ 'volume_length': 4}},
344
+ 'texture': {'bounds': None,
345
+ 'doc_default': None,
346
+ 'native_path': 'texturesToApply[0]',
347
+ 'transform': 'texture_native_id'}},
348
+ 'native_type': 7,
349
+ 'sub_type_field': None}},
350
+ 'envelope': {'blend': 0,
351
+ 'color_key_order': ['color', 'opacity', 'blend'],
352
+ 'fixed': {'config': {},
353
+ 'glitterOpacity': 1.0,
354
+ 'opacityMultiplier': 1.0,
355
+ 'subType': 0,
356
+ 'texturesToApply': [],
357
+ 'texturesToFetch': []}},
358
+ 'texture_slots': {'eyeshadow-neon': [1],
359
+ 'eyeshadow-pastel': [1],
360
+ 'eyeshadow-primary': [1],
361
+ 'mostly-lids-eyeshadow': [1]},
362
+ 'textures': [{'category': 'blush', 'id': 'blush.1', 'native_id': 'blusher-1'},
363
+ {'category': 'blush', 'id': 'blush.2', 'native_id': 'blusher-2'},
364
+ {'category': 'blush', 'id': 'blush.3', 'native_id': 'blusher-3'},
365
+ {'category': 'blush', 'id': 'blush.4', 'native_id': 'blusher-4'},
366
+ {'category': 'blush',
367
+ 'id': 'blush.diamond',
368
+ 'native_id': 'blusher-diamond'},
369
+ {'category': 'blush', 'id': 'blush.heart', 'native_id': 'blusher-heart'},
370
+ {'category': 'blush', 'id': 'blush.new', 'native_id': 'blusher-new'},
371
+ {'category': 'blush',
372
+ 'id': 'blush.square',
373
+ 'native_id': 'blusher-square'},
374
+ {'category': 'bronzer', 'id': 'bronzer.1', 'native_id': 'bronzer-1'},
375
+ {'category': 'bronzer', 'id': 'bronzer.2', 'native_id': 'bronzer-2'},
376
+ {'category': 'bronzer', 'id': 'bronzer.3', 'native_id': 'bronzer-3'},
377
+ {'category': 'bronzer', 'id': 'bronzer.4', 'native_id': 'bronzer-4'},
378
+ {'category': 'bronzer', 'id': 'bronzer.5', 'native_id': 'bronzer-5'},
379
+ {'category': 'concealer',
380
+ 'id': 'concealer.1',
381
+ 'native_id': 'concealer-1'},
382
+ {'category': 'contour', 'id': 'contour.1', 'native_id': 'contour-1'},
383
+ {'category': 'contour', 'id': 'contour.2', 'native_id': 'contour-2'},
384
+ {'category': 'contour', 'id': 'contour.3', 'native_id': 'contour-3'},
385
+ {'category': 'contour', 'id': 'contour.4', 'native_id': 'contour-4'},
386
+ {'category': 'contour', 'id': 'contour.5', 'native_id': 'contour-5'},
387
+ {'category': 'contour', 'id': 'contour.6', 'native_id': 'contour-6'},
388
+ {'category': 'eyebrow',
389
+ 'id': 'eyebrow.microfiller',
390
+ 'native_id': 'eyebrow-microfiller'},
391
+ {'category': 'eyebrow',
392
+ 'id': 'eyebrow.pomade',
393
+ 'native_id': 'eyebrow-pomade'},
394
+ {'category': 'eyeliner', 'id': 'eyeliner.1', 'native_id': 'eyeliner-1'},
395
+ {'category': 'eyeliner',
396
+ 'id': 'eyeliner.eyepencil-1',
397
+ 'native_id': 'eyepencil-1'},
398
+ {'category': 'eyeshadow',
399
+ 'id': 'eyeshadow.mostly-lids-eyeshadow',
400
+ 'native_id': 'mostly-lids-eyeshadow'},
401
+ {'category': 'eyeshadow',
402
+ 'id': 'eyeshadow.neon',
403
+ 'native_id': 'eyeshadow-neon'},
404
+ {'category': 'eyeshadow',
405
+ 'id': 'eyeshadow.pastel',
406
+ 'native_id': 'eyeshadow-pastel'},
407
+ {'category': 'eyeshadow',
408
+ 'id': 'eyeshadow.primary',
409
+ 'native_id': 'eyeshadow-primary'},
410
+ {'category': 'fun_mask', 'id': 'fun_mask.1', 'native_id': 'funmask-1'},
411
+ {'category': 'glitter', 'id': 'glitter.1', 'native_id': 'glitter-1'},
412
+ {'category': 'glitter', 'id': 'glitter.2', 'native_id': 'glitter-2'},
413
+ {'category': 'glitter', 'id': 'glitter.3', 'native_id': 'glitter-3'},
414
+ {'category': 'highlighter',
415
+ 'id': 'highlighter.1',
416
+ 'native_id': 'highlighter-1'},
417
+ {'category': 'highlighter',
418
+ 'id': 'highlighter.2',
419
+ 'native_id': 'highlighter-2'},
420
+ {'category': 'highlighter',
421
+ 'id': 'highlighter.3',
422
+ 'native_id': 'highlighter-3'},
423
+ {'category': 'highlighter',
424
+ 'id': 'highlighter.4',
425
+ 'native_id': 'highlighter-4'},
426
+ {'category': 'highlighter',
427
+ 'id': 'highlighter.5',
428
+ 'native_id': 'highlighter-5'},
429
+ {'category': 'highlighter',
430
+ 'id': 'highlighter.6',
431
+ 'native_id': 'highlighter-6'},
432
+ {'category': 'highlighter',
433
+ 'id': 'highlighter.7',
434
+ 'native_id': 'highlighter-7'},
435
+ {'category': 'highlighter',
436
+ 'id': 'highlighter.8',
437
+ 'native_id': 'highlighter-8'},
438
+ {'category': 'lipstick',
439
+ 'id': 'lipstick.glitter',
440
+ 'native_id': 'dibs_glitter'},
441
+ {'category': 'lipstick', 'id': 'lipstick.gloss', 'native_id': 'lipgloss'},
442
+ {'category': 'lipstick',
443
+ 'id': 'lipstick.glossy-glitter',
444
+ 'native_id': 'dibs_glitter_glossy'},
445
+ {'category': 'lipstick',
446
+ 'id': 'lipstick.semi-bright',
447
+ 'native_id': 'semi_bright'},
448
+ {'category': 'lipstick', 'id': 'lipstick.sheer', 'native_id': 'lipsheer'},
449
+ {'category': 'lipstick',
450
+ 'id': 'lipstick.shimmer',
451
+ 'native_id': 'lipshimmer'},
452
+ {'category': 'mascara', 'id': 'mascara.1', 'native_id': 'mascara-1'}]}
453
+ # fmt: on
@@ -0,0 +1,161 @@
1
+ """Typed makeup products for ``client.makeup.try_on(products=...)``.
2
+
3
+ ``try_on`` accepts any mapping; these ``TypedDict`` s name what the API publishes so a
4
+ type checker can catch a misspelt field. Fields marked *revision 2* are part of the
5
+ certified revision-2 request, open to every account; omitting one (or sending its
6
+ default) is a revision-1 request. Eyebrow and eye pencil are not
7
+ available, and neither are textured lipstick finishes. The docs' makeup and hair
8
+ catalogue lists every texture id.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from typing import Literal, NotRequired, TypedDict
14
+
15
+
16
+ class Shade(TypedDict):
17
+ color: str
18
+ opacity: NotRequired[float]
19
+
20
+
21
+ class FoundationProduct(TypedDict):
22
+ category: Literal["foundation"]
23
+ color: str
24
+ opacity: NotRequired[float]
25
+ finish: NotRequired[Literal["natural", "bright"]] # revision 2
26
+ coverage: NotRequired[float] # revision 2, 0-1.5
27
+ coverage_opacity: NotRequired[float] # revision 2, 0.5-1.5
28
+ coverage_face_blur: NotRequired[float] # revision 2, 0.5-1.5
29
+
30
+
31
+ class LipstickShading(TypedDict, total=False):
32
+ darkness_opacity: float
33
+ darkness_smooth: int
34
+ lightness_opacity: float
35
+ lightness_smooth: int
36
+ reflectance: float
37
+ reflectance_opacity: float
38
+
39
+
40
+ class LipstickProduct(TypedDict):
41
+ category: Literal["lipstick"]
42
+ color: str
43
+ opacity: NotRequired[float]
44
+ finish: NotRequired[Literal["matte", "gloss", "metallic"]] # revision 2
45
+ look: NotRequired[Literal["full", "ombre"]] # revision 2; ombre needs `ombre`
46
+ ombre: NotRequired[Shade] # revision 2
47
+ shading: NotRequired[LipstickShading] # revision 2
48
+
49
+
50
+ class LipLinerProduct(TypedDict):
51
+ category: Literal["lip_liner"]
52
+ color: str
53
+ opacity: NotRequired[float]
54
+ thickness: NotRequired[float] # revision 2, 0-1
55
+ wideness: NotRequired[float] # revision 2, 0-1
56
+ upper_lip_offset: NotRequired[float] # revision 2, 0-1
57
+ lower_lip_offset: NotRequired[float] # revision 2, 0-1
58
+
59
+
60
+ class BlushGlitter(TypedDict):
61
+ texture: str
62
+ opacity: NotRequired[float]
63
+
64
+
65
+ class BlushProduct(TypedDict):
66
+ category: Literal["blush"]
67
+ color: str
68
+ texture: str
69
+ opacity: NotRequired[float]
70
+ glitter: NotRequired[BlushGlitter]
71
+
72
+
73
+ class ContourProduct(TypedDict):
74
+ category: Literal["contour"]
75
+ color: str
76
+ texture: str
77
+ opacity: NotRequired[float]
78
+
79
+
80
+ class BronzerProduct(TypedDict):
81
+ category: Literal["bronzer"]
82
+ color: str
83
+ texture: str
84
+ opacity: NotRequired[float]
85
+
86
+
87
+ class ConcealerProduct(TypedDict):
88
+ category: Literal["concealer"]
89
+ color: str
90
+ texture: str
91
+ opacity: NotRequired[float]
92
+ coverage: NotRequired[float] # 0-1.5
93
+
94
+
95
+ class EyeshadowProduct(TypedDict):
96
+ category: Literal["eyeshadow"]
97
+ texture: str
98
+ shades: list[Shade] # one per texture slot
99
+
100
+
101
+ class EyelinerProduct(TypedDict):
102
+ category: Literal["eyeliner"]
103
+ color: str
104
+ texture: str
105
+ opacity: NotRequired[float]
106
+ style: NotRequired[Literal["normal", "dark_matte"]]
107
+
108
+
109
+ class HighlighterProduct(TypedDict):
110
+ category: Literal["highlighter"]
111
+ color: str
112
+ texture: str
113
+ opacity: NotRequired[float]
114
+ silvery: NotRequired[bool]
115
+ silvery_opacity: NotRequired[float] # 0-1
116
+ colored: NotRequired[bool]
117
+ light_control: NotRequired[int] # 0-100
118
+ reflectance_control: NotRequired[int] # 0-100
119
+ intensity: NotRequired[int] # 0-100
120
+
121
+
122
+ class MascaraProduct(TypedDict):
123
+ category: Literal["mascara"]
124
+ color: str
125
+ texture: str
126
+ opacity: NotRequired[float]
127
+ style: NotRequired[
128
+ Literal[
129
+ "volume",
130
+ "curl",
131
+ "length",
132
+ "volume_curl",
133
+ "volume_length",
134
+ "curl_length",
135
+ "volume_curl_length",
136
+ ]
137
+ ]
138
+
139
+
140
+ class FunMaskProduct(TypedDict):
141
+ category: Literal["fun_mask"]
142
+ texture: str
143
+ opacity: NotRequired[float]
144
+
145
+
146
+ MakeupProduct = (
147
+ FoundationProduct
148
+ | LipstickProduct
149
+ | LipLinerProduct
150
+ | BlushProduct
151
+ | ContourProduct
152
+ | BronzerProduct
153
+ | ConcealerProduct
154
+ | EyeshadowProduct
155
+ | EyelinerProduct
156
+ | HighlighterProduct
157
+ | MascaraProduct
158
+ | FunMaskProduct
159
+ )
160
+
161
+ HairBlend = Literal["tint", "color", "overlay"]