-
-
Notifications
You must be signed in to change notification settings - Fork 286
/
workattribute.js
51 lines (43 loc) · 1.51 KB
/
workattribute.js
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
/*
* @flow strict
* Copyright (C) 2017 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/
/* eslint-disable no-unused-vars */
// MusicBrainz::Server::Entity::WorkAttribute::TO_JSON
declare type WorkAttributeT = {
// Generally shouldn't be null, but the id isn't stored in edit data.
+id: number | null,
// N.B. TypeRoleT requires typeID to be nullable.
+typeID: number,
+typeName: string,
+value: string,
+value_id: number | null,
};
declare type WorkAttributeTypeAllowedValueT = {
...OptionTreeT<'work_attribute_type_allowed_value'>,
+value: string,
+workAttributeTypeID: number,
};
// See MusicBrainz::Server::Controller::Work::stash_work_form_json
declare type WorkAttributeTypeAllowedValueTreeT = {
...WorkAttributeTypeAllowedValueT,
+children?: $ReadOnlyArray<WorkAttributeTypeAllowedValueTreeT>,
};
declare type WorkAttributeTypeAllowedValueTreeRootT =
{+children: $ReadOnlyArray<WorkAttributeTypeAllowedValueTreeT>};
declare type WorkAttributeTypeT = {
...CommentRoleT,
...OptionTreeT<'work_attribute_type'>,
+free_text: boolean,
};
// See MusicBrainz::Server::Controller::Work::stash_work_form_json
declare type WorkAttributeTypeTreeT = {
...WorkAttributeTypeT,
+children?: $ReadOnlyArray<WorkAttributeTypeTreeT>,
};
declare type WorkAttributeTypeTreeRootT =
{+children: $ReadOnlyArray<WorkAttributeTypeTreeT>};