musicbrainz-api 0.23.0 → 0.23.1

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.
@@ -0,0 +1,630 @@
1
+ import DateTimeFormat = Intl.DateTimeFormat;
2
+ import type { IFormData } from './musicbrainz-api.js';
3
+ export interface IPeriod {
4
+ 'begin': string;
5
+ 'ended': boolean;
6
+ 'end': string;
7
+ }
8
+ export interface ITypedEntity extends IEntity {
9
+ 'type-id': string;
10
+ type: string;
11
+ id: string;
12
+ }
13
+ export interface IEntity {
14
+ id: string;
15
+ }
16
+ export interface LifeSpan {
17
+ ended: boolean;
18
+ begin: null | string;
19
+ end: null | string;
20
+ }
21
+ export interface IArea extends ITypedEntity {
22
+ type: 'Country' | 'Subdivision' | 'Municipality' | 'City' | 'District' | 'Island';
23
+ 'iso-3166-1-codes'?: string[];
24
+ primary: boolean;
25
+ name: string;
26
+ 'sort-name': string;
27
+ disambiguation: string;
28
+ 'life-span': LifeSpan;
29
+ }
30
+ export interface IAlias extends ITypedEntity {
31
+ name: string;
32
+ 'sort-name': string;
33
+ ended: boolean;
34
+ locale: string;
35
+ primary: string;
36
+ begin: string;
37
+ end: string;
38
+ }
39
+ export interface IMatch {
40
+ score: number;
41
+ }
42
+ export type Gender = 'male' | 'female' | 'other' | 'not applicable';
43
+ export interface IArtist extends ITypedEntity {
44
+ name: string;
45
+ disambiguation: string;
46
+ 'sort-name': string;
47
+ 'gender-id'?: string;
48
+ 'life-span'?: IPeriod;
49
+ country?: string;
50
+ ipis?: string[];
51
+ isnis?: string[];
52
+ aliases?: IAlias[];
53
+ gender?: Gender;
54
+ area?: IArea;
55
+ begin_area?: IArea;
56
+ end_area?: IArea;
57
+ relations?: IRelation[];
58
+ /**
59
+ * Only defined if 'releases' are includes
60
+ */
61
+ releases?: IRelease[];
62
+ 'release-groups'?: IReleaseGroup[];
63
+ }
64
+ export interface IArtistCredit {
65
+ artist: IArtist;
66
+ joinphrase: string;
67
+ name: string;
68
+ }
69
+ export interface ICollection extends ITypedEntity {
70
+ type: 'Recording collection';
71
+ name: string;
72
+ 'recording-count': number;
73
+ editor: string;
74
+ 'entity-type': string;
75
+ }
76
+ export interface IEvent extends ITypedEntity {
77
+ cancelled: boolean;
78
+ 'life-span': IPeriod;
79
+ disambiguation: string;
80
+ time: string;
81
+ setlist: string;
82
+ name: string;
83
+ }
84
+ export type InstrumentType = 'Wind instrument' | 'String instrument' | 'Percussion instrument' | 'Electronic instrument' | 'Family' | 'Ensemble' | 'Other instrument';
85
+ export interface IInstrument extends ITypedEntity {
86
+ disambiguation: string;
87
+ name: string;
88
+ type: InstrumentType;
89
+ description: string;
90
+ }
91
+ export type ReleaseQuality = 'normal' | 'high';
92
+ export type ReleaseStatus = 'Official' | 'Promotion' | 'Bootleg' | 'Pseudo-release' | 'Withdrawn' | 'Expunged' | 'Cancelled';
93
+ export type ReleasePackaging = 'Book' | 'Box' | 'Cardboard/Paper Sleeve' | 'Cassette Case' | 'Clamshell Case' | 'Digibook' | 'Digifile' | 'Digipak' | 'Discbox Slider' | 'Fatbox' | 'Gatefold Cover' | 'Jewel case' | 'Keep Case' | 'Longbox' | 'Metal Tin' | 'Plastic sleeve' | 'Slidepack' | 'Slim Jewel Case' | 'Snap Case' | 'SnapPack' | 'Super Jewel Box' | 'Other' | 'None';
94
+ export interface IRelease extends IEntity {
95
+ title: string;
96
+ 'text-representation': {
97
+ 'language': string;
98
+ 'script': string;
99
+ };
100
+ disambiguation: string;
101
+ asin: null | string;
102
+ status: ReleaseStatus;
103
+ 'status-id': string;
104
+ packaging?: ReleasePackaging;
105
+ 'packaging-id'?: string;
106
+ 'release-events'?: IReleaseEvent[];
107
+ date: string;
108
+ media: IMedium[];
109
+ 'cover-art-archive': ICoverArtArchive;
110
+ country: string;
111
+ quality: ReleaseQuality;
112
+ barcode: string;
113
+ relations?: IRelation[];
114
+ 'artist-credit'?: IArtistCredit[];
115
+ 'release-group'?: IReleaseGroup;
116
+ collections?: ICollection[];
117
+ 'track-count'?: number;
118
+ }
119
+ export interface IReleaseEvent {
120
+ area?: IArea;
121
+ date?: string;
122
+ }
123
+ export type MediaFormatType = 'Digital Media';
124
+ export interface IRecording extends IEntity {
125
+ video: boolean;
126
+ length: number;
127
+ title: string;
128
+ disambiguation: string;
129
+ isrcs?: string[];
130
+ releases?: IRelease[];
131
+ relations?: IRelation[];
132
+ 'artist-credit'?: IArtistCredit[];
133
+ aliases?: IAlias[];
134
+ 'first-release-date': string;
135
+ }
136
+ export interface ITrack extends IEntity {
137
+ position: number;
138
+ recording: IRecording;
139
+ 'number': string;
140
+ length: number;
141
+ title: string;
142
+ 'artist-credit'?: IArtistCredit[];
143
+ }
144
+ export interface IMedium {
145
+ title: string;
146
+ format?: string;
147
+ 'format-id': string;
148
+ tracks: ITrack[];
149
+ 'track-count': number;
150
+ 'track-offset': number;
151
+ position: number;
152
+ }
153
+ export interface ICoverArtArchive {
154
+ count: number;
155
+ front: boolean;
156
+ darkened: boolean;
157
+ artwork: boolean;
158
+ back: boolean;
159
+ }
160
+ export interface IReleaseGroup extends IEntity {
161
+ count: number;
162
+ disambiguation?: string;
163
+ title: string;
164
+ 'secondary-types': string[];
165
+ 'first-release-date': string;
166
+ 'primary-type': string;
167
+ 'primary-type-id'?: string;
168
+ 'secondary-type-ids'?: string[];
169
+ 'sort-name': string;
170
+ 'artist-credit': {
171
+ artist: IArtist;
172
+ name: string;
173
+ joinphrase: string;
174
+ }[];
175
+ releases?: IRelease[];
176
+ }
177
+ export interface IAreaMatch extends IArea, IMatch {
178
+ }
179
+ export interface IArtistMatch extends IArtist, IMatch {
180
+ }
181
+ export interface IRecordingMatch extends IRecording, IMatch {
182
+ }
183
+ export interface IReleaseGroupMatch extends IReleaseGroup, IMatch {
184
+ }
185
+ export interface IReleaseMatch extends IRelease, IMatch {
186
+ count: number;
187
+ }
188
+ export interface ISearchResult {
189
+ created: DateTimeFormat;
190
+ count: number;
191
+ offset: number;
192
+ }
193
+ export interface IArtistList extends ISearchResult {
194
+ artists: IArtistMatch[];
195
+ }
196
+ export interface IAreaList extends ISearchResult {
197
+ areas: IAreaMatch[];
198
+ }
199
+ export interface IReleaseList extends ISearchResult {
200
+ releases: IReleaseMatch[];
201
+ 'release-count': number;
202
+ }
203
+ export interface IRecordingList extends ISearchResult {
204
+ recordings: IRecordingMatch[];
205
+ 'recordings-count': number;
206
+ }
207
+ export interface IReleaseGroupList extends ISearchResult {
208
+ 'release-groups': IReleaseGroupMatch[];
209
+ }
210
+ export interface IUrlList extends ISearchResult {
211
+ urls: IUrlMatch[];
212
+ }
213
+ export type RelationDirection = 'backward' | 'forward';
214
+ export interface IRelation {
215
+ artist?: IArtist;
216
+ 'attribute-ids': unknown[];
217
+ direction: RelationDirection;
218
+ 'target-credit': string;
219
+ end: null | unknown;
220
+ 'source-credit': string;
221
+ ended: boolean;
222
+ 'attribute-values': unknown[];
223
+ attributes?: any[];
224
+ type: string;
225
+ begin?: null | unknown;
226
+ 'target-type'?: 'url';
227
+ 'type-id': string;
228
+ url?: IUrl;
229
+ release?: IRelease;
230
+ }
231
+ export interface IRelationList {
232
+ relations: IRelation[];
233
+ }
234
+ export interface IWork extends IEntity {
235
+ title: string;
236
+ }
237
+ export interface ILabel extends IEntity {
238
+ asin: null | string;
239
+ barcode: null | string;
240
+ country: null | string;
241
+ name: string;
242
+ 'sort-name': string;
243
+ 'life-span': LifeSpan;
244
+ disambiguation?: string;
245
+ 'label-code': null | string;
246
+ ipis: string[];
247
+ area: IArea;
248
+ }
249
+ export interface IPlace extends IEntity {
250
+ name: string;
251
+ }
252
+ export interface ISeries extends ITypedEntity {
253
+ name: string;
254
+ disambiguation: string;
255
+ }
256
+ export interface IUrl extends IEntity {
257
+ id: string;
258
+ resource: string;
259
+ relations?: IRelationList[];
260
+ }
261
+ export interface IUrlMatch extends IMatch, IUrl {
262
+ }
263
+ export interface IUrlSearchResult extends ISearchResult {
264
+ urls: IUrlMatch[];
265
+ }
266
+ export interface IIsrcSearchResult extends ISearchResult {
267
+ 'isrc': string;
268
+ 'recordings': IRecording[];
269
+ }
270
+ export interface IExernalIds {
271
+ [type: string]: string;
272
+ }
273
+ export interface IReleaseSearchResult extends ISearchResult {
274
+ releases: IRelease[];
275
+ }
276
+ /**
277
+ * https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#Subqueries
278
+ */
279
+ export type EntityType = 'area' | 'artist' | 'collection' | 'event' | 'instrument' | 'label' | 'place' | 'recording' | 'release' | 'release-group' | 'series' | 'work' | 'url';
280
+ export type Relationships = 'area-rels' | 'artist-rels' | 'event-rels' | 'instrument-rels' | 'label-rels' | 'place-rels' | 'recording-rels' | 'release-rels' | 'release-group-rels' | 'series-rels' | 'url-rels' | 'work-rels';
281
+ export declare enum LinkType {
282
+ license = 302,
283
+ production = 256,
284
+ samples_IMDb_entry = 258,
285
+ get_the_music = 257,
286
+ purchase_for_download = 254,
287
+ download_for_free = 255,
288
+ stream_for_free = 268,
289
+ crowdfunding_page = 905,
290
+ other_databases = 306,
291
+ Allmusic = 285
292
+ }
293
+ /**
294
+ * https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2/Search#Artist
295
+ */
296
+ export interface IPagination {
297
+ /**
298
+ * Return search results starting at a given offset. Used for paging through more than one page of results.
299
+ */
300
+ offset?: number;
301
+ /**
302
+ * An integer value defining how many entries should be returned. Only values between 1 and 100 (both inclusive) are allowed. If not given, this defaults to 25.
303
+ */
304
+ limit?: number;
305
+ }
306
+ /**
307
+ * https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2/Search#Artist
308
+ */
309
+ export interface ISearchQuery<I extends string> extends IPagination {
310
+ /**
311
+ * Lucene search query, this is mandatory
312
+ */
313
+ query?: string | IFormData;
314
+ inc?: I[];
315
+ artist?: string;
316
+ }
317
+ /**
318
+ * https://musicbrainz.org/doc/MusicBrainz_API#Browse
319
+ * /ws/2/area collection
320
+ */
321
+ export interface ILinkedEntitiesArea {
322
+ collection?: string;
323
+ }
324
+ /**
325
+ * https://musicbrainz.org/doc/MusicBrainz_API#Browse
326
+ * /ws/2/artist area, collection, recording, release, release-group, work
327
+ */
328
+ export interface ILinkedEntitiesArtist {
329
+ area?: string;
330
+ collection?: string;
331
+ recording?: string;
332
+ release?: string;
333
+ 'release-group'?: string;
334
+ work?: string;
335
+ }
336
+ /**
337
+ * https://musicbrainz.org/doc/MusicBrainz_API#Browse
338
+ * /ws/2/collection area, artist, editor, event, label, place, recording, release, release-group, work
339
+ */
340
+ export interface ILinkedEntitiesCollection {
341
+ area?: string;
342
+ artist?: string;
343
+ editor?: string;
344
+ event?: string;
345
+ label?: string;
346
+ place?: string;
347
+ recording?: string;
348
+ release?: string;
349
+ 'release-group'?: string;
350
+ work?: string;
351
+ }
352
+ /**
353
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
354
+ * /ws/2/event area, artist, collection, place
355
+ */
356
+ export interface ILinkedEntitiesEvent {
357
+ area?: string;
358
+ artist?: string;
359
+ collection?: string;
360
+ place?: string;
361
+ }
362
+ /**
363
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
364
+ * /ws/2/instrument collection
365
+ */
366
+ export interface ILinkedEntitiesInstrument {
367
+ collection?: string;
368
+ }
369
+ /**
370
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
371
+ * /ws/2/label area, collection, release
372
+ */
373
+ export interface ILinkedEntitiesLabel {
374
+ area?: string;
375
+ collection?: string;
376
+ release?: string;
377
+ }
378
+ /**
379
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
380
+ * /ws/2/place area, collection
381
+ */
382
+ export interface IBrowseArgumentPlace {
383
+ area?: string;
384
+ collection?: string;
385
+ }
386
+ /**
387
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
388
+ * /ws/2/recording artist, collection, release, work
389
+ */
390
+ export interface ILinkedEntitiesRecording {
391
+ area?: string;
392
+ collection?: string;
393
+ release?: string;
394
+ work?: string;
395
+ }
396
+ /**
397
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
398
+ * /ws/2/release area, artist, collection, label, track, track_artist, recording, release-group
399
+ */
400
+ export interface ILinkedEntitiesRelease {
401
+ area?: string;
402
+ artist?: string;
403
+ collection?: string;
404
+ label?: string;
405
+ track?: string;
406
+ track_artist?: string;
407
+ recording?: string;
408
+ 'release-group'?: string;
409
+ }
410
+ /**
411
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
412
+ * /ws/2/release-group artist, collection, release
413
+ */
414
+ export interface ILinkedEntitiesReleaseGroup {
415
+ artist?: string;
416
+ collection?: string;
417
+ release?: string;
418
+ }
419
+ /**
420
+ * https://musicbrainz.org/doc/MusicBrainz_API#Subqueries
421
+ * /ws/2/series collection
422
+ */
423
+ export interface ILinkedEntitiesSeries {
424
+ collection?: string;
425
+ }
426
+ /**
427
+ * https://musicbrainz.org/doc/MusicBrainz_API#Browse
428
+ * /ws/2/work artist, collection
429
+ */
430
+ export interface ILinkedEntitiesWork {
431
+ artist?: string;
432
+ collection?: string;
433
+ }
434
+ /**
435
+ * https://musicbrainz.org/doc/MusicBrainz_API#Browse
436
+ * /ws/2/url resource
437
+ */
438
+ export interface ILinkedEntitiesUrl {
439
+ resource?: string;
440
+ }
441
+ /**
442
+ * Browse artist query <entity>: <MBID>
443
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
444
+ */
445
+ export interface IBrowseAreasQuery extends IPagination {
446
+ collection?: string;
447
+ }
448
+ /**
449
+ * Browse artist query <entity>: <MBID>
450
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
451
+ */
452
+ export interface IBrowseArtistsQuery extends IPagination {
453
+ area?: string;
454
+ collection?: string;
455
+ recording?: string;
456
+ release?: string;
457
+ 'release-group'?: string;
458
+ work?: string;
459
+ }
460
+ /**
461
+ * Browse collection query <entity>: <MBID>
462
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
463
+ */
464
+ export interface IBrowseCollectionsQuery extends IPagination {
465
+ area?: string;
466
+ artist?: string;
467
+ editor?: string;
468
+ event?: string;
469
+ label?: string;
470
+ place?: string;
471
+ recording?: string;
472
+ release?: string;
473
+ 'release-group'?: string;
474
+ work?: string;
475
+ }
476
+ /**
477
+ * Browse events query <entity>: <MBID>
478
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
479
+ */
480
+ export interface IBrowseEventsQuery extends IPagination {
481
+ area?: string;
482
+ artist?: string;
483
+ collection?: string;
484
+ place?: string;
485
+ }
486
+ /**
487
+ * Browse instruments query <entity>: <MBID>
488
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
489
+ */
490
+ export interface IBrowseInstrumentsQuery extends IPagination {
491
+ collection?: string;
492
+ }
493
+ /**
494
+ * Browse labels query <entity>: <MBID>
495
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
496
+ */
497
+ export interface IBrowseLabelsQuery extends IPagination {
498
+ area?: string;
499
+ collection?: string;
500
+ release?: string;
501
+ }
502
+ /**
503
+ * Browse places query <entity>: <MBID>
504
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
505
+ */
506
+ export interface IBrowsePlacesQuery extends IPagination {
507
+ area?: string;
508
+ collection?: string;
509
+ }
510
+ /**
511
+ * Browse recordings query <entity>: <MBID>
512
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
513
+ */
514
+ export interface IBrowseRecordingsQuery extends IPagination {
515
+ artist?: string;
516
+ collection?: string;
517
+ release?: string;
518
+ work?: string;
519
+ }
520
+ /**
521
+ * Browse releases query <entity>: <MBID>
522
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
523
+ */
524
+ export interface IBrowseReleasesQuery extends IPagination {
525
+ area?: string;
526
+ artist?: string;
527
+ editor?: string;
528
+ event?: string;
529
+ label?: string;
530
+ place?: string;
531
+ recording?: string;
532
+ release?: string;
533
+ 'release-group'?: string;
534
+ work?: string;
535
+ }
536
+ /**
537
+ * Browse release-groups query <entity>: <MBID>
538
+ */
539
+ export interface IBrowseReleaseGroupsQuery extends IPagination {
540
+ artist?: string;
541
+ collection?: string;
542
+ release?: string;
543
+ }
544
+ /**
545
+ * Browse release query <entity>: <MBID>
546
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
547
+ */
548
+ export interface IBrowseSeriesQuery extends IPagination {
549
+ collection?: string;
550
+ }
551
+ /**
552
+ * Browse urls query <entity>: <MBID>
553
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
554
+ */
555
+ export interface IBrowseUrlsQuery extends IPagination {
556
+ resource?: string;
557
+ }
558
+ /**
559
+ * Browse works query <entity>: <MBID>
560
+ * https://wiki.musicbrainz.org/MusicBrainz_API#Linked_entities
561
+ */
562
+ export interface IBrowseWorksQuery extends IPagination {
563
+ artist?: string;
564
+ collection?: string;
565
+ }
566
+ export interface IBrowseAreasResult {
567
+ area: IArea;
568
+ 'area-count': number;
569
+ 'area-offset': number;
570
+ }
571
+ export interface IBrowseArtistsResult {
572
+ artists: IArtist[];
573
+ 'artist-count': number;
574
+ 'artist-offset': number;
575
+ }
576
+ export interface IBrowseCollectionsResult {
577
+ collections: ICollection[];
578
+ 'collection-count': number;
579
+ 'collection-offset': number;
580
+ }
581
+ export interface IBrowseEventsResult {
582
+ events: IEvent[];
583
+ 'event-count': number;
584
+ 'event-offset': number;
585
+ }
586
+ export interface IBrowseInstrumentsResult {
587
+ instruments: IInstrument[];
588
+ 'instrument-count': number;
589
+ 'instrument-offset': number;
590
+ }
591
+ export interface IBrowseLabelsResult {
592
+ label: ILabel[];
593
+ 'label-count': number;
594
+ 'label-offset': number;
595
+ }
596
+ export interface IBrowsePlacesResult {
597
+ place: IPlace[];
598
+ 'place-count': number;
599
+ 'place-offset': number;
600
+ }
601
+ export interface IBrowseRecordingsResult {
602
+ recording: IRecording[];
603
+ 'recording-count': number;
604
+ 'recording-offset': number;
605
+ }
606
+ export interface IBrowseReleasesResult {
607
+ releases: IRelease[];
608
+ 'release-count': number;
609
+ 'release-offset': number;
610
+ }
611
+ export interface IBrowseReleaseGroupsResult {
612
+ 'release-groups': IReleaseGroup[];
613
+ 'release-group-count': number;
614
+ 'release-group-offset': number;
615
+ }
616
+ export interface IBrowseSeriesResult {
617
+ series: IReleaseGroup[];
618
+ 'series-count': number;
619
+ 'series-offset': number;
620
+ }
621
+ export interface IBrowseWorksResult {
622
+ works: IReleaseGroup[];
623
+ 'work-count': number;
624
+ 'work-offset': number;
625
+ }
626
+ export interface IUrlLookupResult {
627
+ 'url-offset': number;
628
+ 'url-count': number;
629
+ urls: IUrl[];
630
+ }
@@ -0,0 +1,14 @@
1
+ export var LinkType;
2
+ (function (LinkType) {
3
+ LinkType[LinkType["license"] = 302] = "license";
4
+ LinkType[LinkType["production"] = 256] = "production";
5
+ LinkType[LinkType["samples_IMDb_entry"] = 258] = "samples_IMDb_entry";
6
+ LinkType[LinkType["get_the_music"] = 257] = "get_the_music";
7
+ LinkType[LinkType["purchase_for_download"] = 254] = "purchase_for_download";
8
+ LinkType[LinkType["download_for_free"] = 255] = "download_for_free";
9
+ LinkType[LinkType["stream_for_free"] = 268] = "stream_for_free";
10
+ LinkType[LinkType["crowdfunding_page"] = 905] = "crowdfunding_page";
11
+ LinkType[LinkType["other_databases"] = 306] = "other_databases";
12
+ LinkType[LinkType["Allmusic"] = 285] = "Allmusic";
13
+ })(LinkType || (LinkType = {}));
14
+ //# sourceMappingURL=musicbrainz.types.js.map
@@ -0,0 +1,17 @@
1
+ import { XmlIsrc } from './xml-isrc.js';
2
+ export declare class XmlIsrcList {
3
+ items: XmlIsrc[];
4
+ pushIsrc(isrc: string): void;
5
+ toXml(): {
6
+ name: string;
7
+ attrs: {
8
+ count: number;
9
+ };
10
+ children: {
11
+ name: string;
12
+ attrs: {
13
+ id: string;
14
+ };
15
+ }[];
16
+ } | null;
17
+ }
@@ -0,0 +1,19 @@
1
+ import { XmlIsrc } from './xml-isrc.js';
2
+ export class XmlIsrcList {
3
+ constructor() {
4
+ this.items = [];
5
+ }
6
+ pushIsrc(isrc) {
7
+ this.items.push(new XmlIsrc(isrc));
8
+ }
9
+ toXml() {
10
+ return this.items.length === 0 ? null : {
11
+ name: 'isrc-list',
12
+ attrs: {
13
+ count: this.items.length
14
+ },
15
+ children: this.items.map(isrc => isrc.toXml())
16
+ };
17
+ }
18
+ }
19
+ //# sourceMappingURL=xml-isrc-list.js.map
@@ -0,0 +1,10 @@
1
+ export declare class XmlIsrc {
2
+ isrc: string;
3
+ constructor(isrc: string);
4
+ toXml(): {
5
+ name: string;
6
+ attrs: {
7
+ id: string;
8
+ };
9
+ };
10
+ }
@@ -0,0 +1,14 @@
1
+ export class XmlIsrc {
2
+ constructor(isrc) {
3
+ this.isrc = isrc;
4
+ }
5
+ toXml() {
6
+ return {
7
+ name: 'isrc',
8
+ attrs: {
9
+ id: this.isrc
10
+ }
11
+ };
12
+ }
13
+ }
14
+ //# sourceMappingURL=xml-isrc.js.map