typedbrainz 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/lib/global.d.ts +56 -27
  2. package/package.json +1 -1
package/lib/global.d.ts CHANGED
@@ -89,6 +89,14 @@ export type ArtistCreditT = {
89
89
  id?: number;
90
90
  names: $ReadOnlyArray<ArtistCreditNameT>;
91
91
  };
92
+ export type IncompleteArtistCreditNameT = {
93
+ artist: ArtistT | null;
94
+ joinPhrase: string;
95
+ name: string;
96
+ };
97
+ export type IncompleteArtistCreditT = {
98
+ names: $ReadOnlyArray<IncompleteArtistCreditNameT>;
99
+ };
92
100
  export type ArtworkRoleT = $ReadOnly<$_$Spread<PendingEditsRoleT, {
93
101
  comment: string;
94
102
  event?: EventT;
@@ -587,6 +595,7 @@ export type AddPlaceEditT = $ReadOnly<$_$Spread<GenericEditT, {
587
595
  }>>;
588
596
  export type AddRelationshipEditT = $ReadOnly<$_$Spread<GenericEditT, {
589
597
  display_data: {
598
+ entered_from?: NonUrlRelatableEntityT;
590
599
  relationship: RelationshipT;
591
600
  unknown_attributes: boolean;
592
601
  };
@@ -618,7 +627,7 @@ export type AddRelationshipTypeEditT = $ReadOnly<$_$Spread<GenericEditT, {
618
627
  link_phrase: string;
619
628
  long_link_phrase: string;
620
629
  name: string;
621
- orderable_direction?: number;
630
+ orderable_direction?: OrderableDirectionT;
622
631
  relationship_type?: LinkTypeT;
623
632
  reverse_link_phrase: string;
624
633
  };
@@ -1019,6 +1028,7 @@ export type EditRecordingEditCurrentT = $ReadOnly<$_$Spread<EditRecordingEditGen
1019
1028
  export type EditRecordingEditT = EditRecordingEditHistoricLengthT | EditRecordingEditHistoricNameT | EditRecordingEditCurrentT;
1020
1029
  export type EditRelationshipEditT = $ReadOnly<$_$Spread<GenericEditT, {
1021
1030
  display_data: {
1031
+ entered_from?: NonUrlRelatableEntityT;
1022
1032
  new: RelationshipT;
1023
1033
  old: RelationshipT;
1024
1034
  unknown_attributes: boolean;
@@ -1060,7 +1070,7 @@ export type EditRelationshipTypeEditT = $ReadOnly<$_$Spread<GenericEditT, {
1060
1070
  link_phrase?: CompT<string>;
1061
1071
  long_link_phrase?: CompT<string>;
1062
1072
  name: CompT<string>;
1063
- orderable_direction?: CompT<number>;
1073
+ orderable_direction?: CompT<OrderableDirectionT>;
1064
1074
  parent?: CompT<LinkTypeT | null>;
1065
1075
  relationship_type: LinkTypeT;
1066
1076
  reverse_link_phrase: CompT<string>;
@@ -1198,8 +1208,8 @@ export type MergePlacesEditT = $ReadOnly<$_$Spread<GenericEditT, {
1198
1208
  export type MergeRecordingsEditT = $ReadOnly<$_$Spread<GenericEditT, {
1199
1209
  display_data: {
1200
1210
  large_spread: boolean;
1201
- new: RecordingWithArtistCreditT;
1202
- old: $ReadOnlyArray<RecordingWithArtistCreditT>;
1211
+ new: RecordingT;
1212
+ old: $ReadOnlyArray<RecordingT>;
1203
1213
  };
1204
1214
  edit_type: EDIT_RECORDING_MERGE_T;
1205
1215
  }>>;
@@ -1428,6 +1438,7 @@ export type RemoveRelationshipEditT = $ReadOnly<$_$Spread<GenericEditT, {
1428
1438
  };
1429
1439
  };
1430
1440
  display_data: {
1441
+ entered_from?: NonUrlRelatableEntityT;
1431
1442
  relationship: RelationshipT;
1432
1443
  };
1433
1444
  edit_type: EDIT_RELATIONSHIP_DELETE_T;
@@ -1491,6 +1502,7 @@ export type ReorderMediumsEditT = $ReadOnly<$_$Spread<GenericEditT, {
1491
1502
  }>>;
1492
1503
  export type ReorderRelationshipsEditT = $ReadOnly<$_$Spread<GenericEditT, {
1493
1504
  display_data: {
1505
+ entered_from?: NonUrlRelatableEntityT;
1494
1506
  relationships: $ReadOnlyArray<{
1495
1507
  new_order: number;
1496
1508
  old_order: number;
@@ -2016,7 +2028,7 @@ export type RecordingT = $ReadOnly<$_$Spread<AnnotationRoleT, $_$Spread<CommentR
2016
2028
  name: string;
2017
2029
  }>;
2018
2030
  artist?: string;
2019
- artistCredit?: ArtistCreditT;
2031
+ artistCredit: ArtistCreditT;
2020
2032
  first_release_date?: PartialDateT;
2021
2033
  isrcs: $ReadOnlyArray<IsrcT>;
2022
2034
  length: number;
@@ -2024,9 +2036,6 @@ export type RecordingT = $ReadOnly<$_$Spread<AnnotationRoleT, $_$Spread<CommentR
2024
2036
  related_works: $ReadOnlyArray<number>;
2025
2037
  video: boolean;
2026
2038
  }>>>>>>;
2027
- export type RecordingWithArtistCreditT = $ReadOnly<$_$Spread<RecordingT, {
2028
- artistCredit: ArtistCreditT;
2029
- }>>;
2030
2039
  export type LinkAttrT = {
2031
2040
  credited_as?: string;
2032
2041
  text_value?: string;
@@ -2075,12 +2084,13 @@ export type LinkTypeT = $_$Spread<OptionTreeT<"link_type">, {
2075
2084
  l_reverse_link_phrase?: string;
2076
2085
  link_phrase: string;
2077
2086
  long_link_phrase: string;
2078
- orderable_direction: number;
2087
+ orderable_direction: OrderableDirectionT;
2079
2088
  reverse_link_phrase: string;
2080
2089
  root_id: number | null;
2081
2090
  type0: RelatableEntityTypeT;
2082
2091
  type1: RelatableEntityTypeT;
2083
2092
  }>;
2093
+ export type OrderableDirectionT = 0 | 1 | 2;
2084
2094
  export type RelationshipT = $ReadOnly<$_$Spread<DatePeriodRoleT, $_$Spread<PendingEditsRoleT, {
2085
2095
  attributes: $ReadOnlyArray<LinkAttrT>;
2086
2096
  backward: boolean;
@@ -2265,6 +2275,7 @@ export type WsJsRelationshipCommonT = {
2265
2275
  begin_date?: PartialDateT;
2266
2276
  end_date?: PartialDateT;
2267
2277
  ended?: boolean;
2278
+ enteredFrom?: WsJsRelationshipEntityT;
2268
2279
  entities: [
2269
2280
  WsJsRelationshipEntityT,
2270
2281
  WsJsRelationshipEntityT
@@ -2284,12 +2295,14 @@ export type WsJsEditRelationshipEditT = $ReadOnly<$_$Spread<Partial<WsJsRelation
2284
2295
  }>>;
2285
2296
  export type WsJsEditRelationshipDeleteT = $ReadOnly<{
2286
2297
  edit_type: EDIT_RELATIONSHIP_DELETE_T;
2298
+ enteredFrom?: WsJsRelationshipEntityT;
2287
2299
  id: number;
2288
2300
  linkTypeID: number;
2289
2301
  }>;
2290
2302
  export type WsJsEditRelationshipT = WsJsEditRelationshipCreateT | WsJsEditRelationshipEditT | WsJsEditRelationshipDeleteT | WsJsEditRelationshipsReorderT;
2291
2303
  export type WsJsEditRelationshipsReorderT = {
2292
2304
  edit_type: EDIT_RELATIONSHIPS_REORDER_T;
2305
+ enteredFrom?: WsJsRelationshipEntityT;
2293
2306
  linkTypeID: number;
2294
2307
  relationship_order: $ReadOnlyArray<{
2295
2308
  link_order: number;
@@ -2484,9 +2497,11 @@ export type LazyReleaseStateT = {
2484
2497
  expandedMediums: $ReadOnlyMap<number, boolean>;
2485
2498
  loadedTracks: LoadedTracksMapT;
2486
2499
  };
2487
- export type RelationshipEditStatusT = number & {
2488
- __OpaqueType__RelationshipEditStatusT: never;
2489
- };
2500
+ export type REL_STATUS_NOOP_T = 0;
2501
+ export type REL_STATUS_ADD_T = 1;
2502
+ export type REL_STATUS_EDIT_T = 2;
2503
+ export type REL_STATUS_REMOVE_T = 3;
2504
+ export type RelationshipEditStatusT = REL_STATUS_NOOP_T | REL_STATUS_ADD_T | REL_STATUS_EDIT_T | REL_STATUS_REMOVE_T;
2490
2505
  export type CreditChangeOptionT = "" | "all" | "same-entity-types" | "same-relationship-type";
2491
2506
  export type RelationshipStateForTypesT<T0 extends RelatableEntityT, T1 extends RelatableEntityT> = {
2492
2507
  _lineage: $ReadOnlyArray<string>;
@@ -2507,25 +2522,25 @@ export type RelationshipStateForTypesT<T0 extends RelatableEntityT, T1 extends R
2507
2522
  };
2508
2523
  export type RelationshipStateT = RelationshipStateForTypesT<RelatableEntityT, RelatableEntityT>;
2509
2524
  export type RelationshipPhraseGroupT = {
2510
- relationships: tree.ImmutableTree<RelationshipStateT> | null;
2525
+ relationships: tree.ImmutableTree<RelationshipStateT>;
2511
2526
  textPhrase: string;
2512
2527
  };
2513
2528
  export type RelationshipLinkTypeGroupT = {
2514
2529
  backward: boolean;
2515
- phraseGroups: tree.ImmutableTree<RelationshipPhraseGroupT> | null;
2530
+ phraseGroups: tree.ImmutableTree<RelationshipPhraseGroupT>;
2516
2531
  typeId: number;
2517
2532
  };
2518
- export type RelationshipLinkTypeGroupsT = tree.ImmutableTree<RelationshipLinkTypeGroupT> | null;
2533
+ export type RelationshipLinkTypeGroupsT = tree.ImmutableTree<RelationshipLinkTypeGroupT>;
2519
2534
  export type RelationshipTargetTypeGroupT = [
2520
2535
  RelatableEntityTypeT,
2521
2536
  RelationshipLinkTypeGroupsT
2522
2537
  ];
2523
- export type RelationshipTargetTypeGroupsT = tree.ImmutableTree<RelationshipTargetTypeGroupT> | null;
2538
+ export type RelationshipTargetTypeGroupsT = tree.ImmutableTree<RelationshipTargetTypeGroupT>;
2524
2539
  export type RelationshipSourceGroupT = [
2525
2540
  RelatableEntityT,
2526
2541
  RelationshipTargetTypeGroupsT
2527
2542
  ];
2528
- export type RelationshipSourceGroupsT = tree.ImmutableTree<RelationshipSourceGroupT> | null;
2543
+ export type RelationshipSourceGroupsT = tree.ImmutableTree<RelationshipSourceGroupT>;
2529
2544
  export type NonReleaseRelatableEntityT = AreaT | ArtistT | EventT | GenreT | InstrumentT | LabelT | PlaceT | RecordingT | ReleaseGroupT | SeriesT | UrlT | WorkT;
2530
2545
  export type RelationshipDialogLocationT = {
2531
2546
  backward?: boolean | null | undefined;
@@ -2579,7 +2594,7 @@ export type DialogAttributeT = DialogBooleanAttributeStateT | DialogMultiselectA
2579
2594
  export type DialogAttributesT = $ReadOnlyArray<DialogAttributeT>;
2580
2595
  export type DialogAttributesStateT = {
2581
2596
  attributesList: DialogAttributesT;
2582
- resultingLinkAttributes: tree.ImmutableTree<LinkAttrT> | null;
2597
+ resultingLinkAttributes: tree.ImmutableTree<LinkAttrT>;
2583
2598
  };
2584
2599
  export type DialogLinkAttributeStateT = {
2585
2600
  creditedAs?: string;
@@ -2636,18 +2651,18 @@ export type MediumWorkStateT = {
2636
2651
  targetTypeGroups: RelationshipTargetTypeGroupsT;
2637
2652
  work: WorkT;
2638
2653
  };
2639
- export type MediumWorkStateTreeT = tree.ImmutableTree<MediumWorkStateT> | null;
2654
+ export type MediumWorkStateTreeT = tree.ImmutableTree<MediumWorkStateT>;
2640
2655
  export type MediumRecordingStateT = {
2641
2656
  isSelected: boolean;
2642
2657
  recording: RecordingT;
2643
2658
  relatedWorks: MediumWorkStateTreeT;
2644
2659
  targetTypeGroups: RelationshipTargetTypeGroupsT;
2645
2660
  };
2646
- export type MediumRecordingStateTreeT = tree.ImmutableTree<MediumRecordingStateT> | null;
2661
+ export type MediumRecordingStateTreeT = tree.ImmutableTree<MediumRecordingStateT>;
2647
2662
  export type MediumStateTreeT = tree.ImmutableTree<[
2648
2663
  MediumWithRecordingsT,
2649
2664
  MediumRecordingStateTreeT
2650
- ]> | null;
2665
+ ]>;
2651
2666
  export type ReleaseRelationshipEditorStateT = $ReadOnly<$_$Spread<$Exact<LazyReleaseStateT>, $_$Spread<$Exact<RelationshipEditorStateT>, {
2652
2667
  editNoteField: FieldT<string>;
2653
2668
  enterEditForm: FormT<{
@@ -2656,8 +2671,8 @@ export type ReleaseRelationshipEditorStateT = $ReadOnly<$_$Spread<$Exact<LazyRel
2656
2671
  entity: ReleaseWithMediumsAndReleaseGroupT;
2657
2672
  mediums: MediumStateTreeT;
2658
2673
  mediumsByRecordingId: RecordingMediumsT;
2659
- selectedRecordings: tree.ImmutableTree<RecordingT> | null;
2660
- selectedWorks: tree.ImmutableTree<WorkT> | null;
2674
+ selectedRecordings: tree.ImmutableTree<RecordingT>;
2675
+ selectedWorks: tree.ImmutableTree<WorkT>;
2661
2676
  submissionError: string | null | undefined;
2662
2677
  submissionInProgress: boolean;
2663
2678
  }>>>;
@@ -2814,7 +2829,7 @@ export type DialogTargetEntityActionT = UpdateTargetEntityAutocompleteActionT |
2814
2829
  type: "update-url-text";
2815
2830
  };
2816
2831
  export type AcceptBatchCreateWorksDialogActionT = {
2817
- attributes: tree.ImmutableTree<LinkAttrT> | null;
2832
+ attributes: tree.ImmutableTree<LinkAttrT>;
2818
2833
  begin_date: PartialDateT | null;
2819
2834
  end_date: PartialDateT | null;
2820
2835
  ended: boolean;
@@ -2853,11 +2868,11 @@ export type ReleaseRelationshipEditorActionT = LazyReleaseActionT | Relationship
2853
2868
  work: WorkT;
2854
2869
  } | {
2855
2870
  isSelected: boolean;
2856
- recordingStates: MediumRecordingStateTreeT | null;
2871
+ recordingStates: MediumRecordingStateTreeT;
2857
2872
  type: "toggle-select-medium-recordings";
2858
2873
  } | {
2859
2874
  isSelected: boolean;
2860
- recordingStates: MediumRecordingStateTreeT | null;
2875
+ recordingStates: MediumRecordingStateTreeT;
2861
2876
  type: "toggle-select-medium-works";
2862
2877
  } | {
2863
2878
  editNote: string;
@@ -2929,6 +2944,20 @@ declare const MBID_REGEXP: RegExp;
2929
2944
  declare const VARTIST_GID = "89ad4ac3-39f7-470e-963a-56509c546377";
2930
2945
  declare const VARTIST_ID = 1;
2931
2946
  declare const VARTIST_NAME = "Various Artists";
2947
+ declare const ANON_ARTIST_GID = "f731ccc4-e22a-43af-a747-64213329e088";
2948
+ declare const ANON_ARTIST_ID = 15071;
2949
+ declare const DATA_ARTIST_GID = "33cf029c-63b0-41a0-9855-be2a3665fb3b";
2950
+ declare const DATA_ARTIST_ID = 41744;
2951
+ declare const DIALOGUE_ARTIST_GID = "314e1c25-dde7-4e4d-b2f4-0a7b9f7c56dc";
2952
+ declare const DIALOGUE_ARTIST_ID = 92121;
2953
+ declare const NO_ARTIST_GID = "eec63d3c-3b81-4ad4-b1e4-7c147d4d2b61";
2954
+ declare const NO_ARTIST_ID = 105725;
2955
+ declare const TRAD_ARTIST_GID = "9be7f096-97ec-4615-8957-8d40b5dcbc41";
2956
+ declare const TRAD_ARTIST_ID = 762646;
2957
+ declare const UNKNOWN_ARTIST_GID = "125ec42a-7229-4250-afc5-e057484327fe";
2958
+ declare const UNKNOWN_ARTIST_ID = 97546;
2959
+ declare const SPECIAL_ARTIST_GIDS: $ReadOnlyArray<string>;
2960
+ declare const SPECIAL_ARTIST_IDS: $ReadOnlyArray<number>;
2932
2961
  declare const NOLABEL_GID = "157afde4-4bf5-4039-8ad2-5a15acc85176";
2933
2962
  declare const NOLABEL_ID = 3267;
2934
2963
  declare const VIDEO_ATTRIBUTE_ID = 582;
@@ -3123,7 +3152,7 @@ declare global {
3123
3152
  }
3124
3153
 
3125
3154
  declare namespace constants {
3126
- export { AREA_TYPE_COUNTRY, ARTIST_GROUP_TYPES, ARTIST_TYPE_CHOIR, ARTIST_TYPE_GROUP, ARTIST_TYPE_ORCHESTRA, ARTIST_TYPE_PERSON, BRACKET_PAIRS, CONTACT_URL, COUNTRY_JA_AREA_ID, DARTIST_ID, DISPLAY_NONE_STYLE, DLABEL_ID, EMPTY_PARTIAL_DATE, ENTITIES_WITH_RELATIONSHIP_CREDITS, ENTITY_NAMES, FAVICON_CLASSES, FLUENCY_NAMES, INSTRUMENT_ROOT_ID, LANGUAGE_ENG_ID, LANGUAGE_MUL_ID, LANGUAGE_ZXX_ID, MAX_LENGTH_DIFFERENCE, MAX_RECENT_ENTITIES, MBID_REGEXP, MIN_NAME_SIMILARITY, NOLABEL_GID, NOLABEL_ID, PART_OF_SERIES_LINK_TYPES, PART_OF_SERIES_LINK_TYPE_GIDS, PART_OF_SERIES_LINK_TYPE_IDS, PROBABLY_CLASSICAL_LINK_TYPES, QUALITY_NAMES, RECORDING_OF_LINK_TYPE_GID, RECORDING_OF_LINK_TYPE_ID, RT_MIRROR, SERIES_ORDERING_ATTRIBUTE, SERIES_ORDERING_TYPE_AUTOMATIC, SERIES_ORDERING_TYPE_MANUAL, TASK_ATTRIBUTE_ID, TIME_ATTRIBUTE, VARTIST_GID, VARTIST_ID, VARTIST_NAME, VIDEO_ATTRIBUTE_GID, VIDEO_ATTRIBUTE_ID, VOCAL_ROOT_ID, WS_EDIT_RESPONSE_NO_CHANGES, WS_EDIT_RESPONSE_OK };
3155
+ export { ANON_ARTIST_GID, ANON_ARTIST_ID, AREA_TYPE_COUNTRY, ARTIST_GROUP_TYPES, ARTIST_TYPE_CHOIR, ARTIST_TYPE_GROUP, ARTIST_TYPE_ORCHESTRA, ARTIST_TYPE_PERSON, BRACKET_PAIRS, CONTACT_URL, COUNTRY_JA_AREA_ID, DARTIST_ID, DATA_ARTIST_GID, DATA_ARTIST_ID, DIALOGUE_ARTIST_GID, DIALOGUE_ARTIST_ID, DISPLAY_NONE_STYLE, DLABEL_ID, EMPTY_PARTIAL_DATE, ENTITIES_WITH_RELATIONSHIP_CREDITS, ENTITY_NAMES, FAVICON_CLASSES, FLUENCY_NAMES, INSTRUMENT_ROOT_ID, LANGUAGE_ENG_ID, LANGUAGE_MUL_ID, LANGUAGE_ZXX_ID, MAX_LENGTH_DIFFERENCE, MAX_RECENT_ENTITIES, MBID_REGEXP, MIN_NAME_SIMILARITY, NOLABEL_GID, NOLABEL_ID, NO_ARTIST_GID, NO_ARTIST_ID, PART_OF_SERIES_LINK_TYPES, PART_OF_SERIES_LINK_TYPE_GIDS, PART_OF_SERIES_LINK_TYPE_IDS, PROBABLY_CLASSICAL_LINK_TYPES, QUALITY_NAMES, RECORDING_OF_LINK_TYPE_GID, RECORDING_OF_LINK_TYPE_ID, RT_MIRROR, SERIES_ORDERING_ATTRIBUTE, SERIES_ORDERING_TYPE_AUTOMATIC, SERIES_ORDERING_TYPE_MANUAL, SPECIAL_ARTIST_GIDS, SPECIAL_ARTIST_IDS, TASK_ATTRIBUTE_ID, TIME_ATTRIBUTE, TRAD_ARTIST_GID, TRAD_ARTIST_ID, UNKNOWN_ARTIST_GID, UNKNOWN_ARTIST_ID, VARTIST_GID, VARTIST_ID, VARTIST_NAME, VIDEO_ATTRIBUTE_GID, VIDEO_ATTRIBUTE_ID, VOCAL_ROOT_ID, WS_EDIT_RESPONSE_NO_CHANGES, WS_EDIT_RESPONSE_OK };
3127
3156
  }
3128
3157
 
3129
3158
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typedbrainz",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",