Skip to content

Commit

Permalink
update to 8.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Nov 19, 2024
1 parent c1bc940 commit 3cb9890
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bcc-code/bmm-sdk-fetch",
"description": "An SDK for the BMM API using the OpenAPI generator for typescript-fetch.",
"version": "8.7.1",
"version": "8.7.2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ models/TrackModelTrackContributorType.ts
models/TrackModelTrackMeta.ts
models/TrackReference.ts
models/TrackSubtype.ts
models/TrackTranslationTranscriptionSegment.ts
models/TranscriptionSegment.ts
models/TranscriptionTranscriptionSource.ts
models/UpdateTrackCollectionCommand.ts
models/UserModel.ts
Expand Down
37 changes: 37 additions & 0 deletions src/apis/LyricsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ export interface LyricsPostRequest {
lyrics?: Lyrics;
}

export interface LyricsSearchTermGetRequest {
term: string;
size?: number;
}

/**
*
*/
Expand Down Expand Up @@ -179,4 +184,36 @@ export class LyricsApi extends runtime.BaseAPI {
await this.lyricsPostRaw(requestParameters, initOverrides);
}

/**
*/
async lyricsSearchTermGetRaw(requestParameters: LyricsSearchTermGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Lyrics>>> {
if (requestParameters.term === null || requestParameters.term === undefined) {
throw new runtime.RequiredError('term','Required parameter requestParameters.term was null or undefined when calling lyricsSearchTermGet.');
}

const queryParameters: any = {};

if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/lyrics/search/{term}`.replace(`{${"term"}}`, encodeURIComponent(String(requestParameters.term))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LyricsFromJSON));
}

/**
*/
async lyricsSearchTermGet(requestParameters: LyricsSearchTermGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Lyrics>> {
const response = await this.lyricsSearchTermGetRaw(requestParameters, initOverrides);
return await response.value();
}

}
26 changes: 13 additions & 13 deletions src/apis/TrackApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type {
PublishedFilter,
TrackModel,
TrackSubtype,
TrackTranslationTranscriptionSegment,
TranscriptionSegment,
} from '../models/index';
import {
LanguageEnumFromJSON,
Expand All @@ -30,8 +30,8 @@ import {
TrackModelToJSON,
TrackSubtypeFromJSON,
TrackSubtypeToJSON,
TrackTranslationTranscriptionSegmentFromJSON,
TrackTranslationTranscriptionSegmentToJSON,
TranscriptionSegmentFromJSON,
TranscriptionSegmentToJSON,
} from '../models/index';

export interface TrackGetRequest {
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface TrackIdTranscriptionLanguageGetRequest {
export interface TrackIdTranscriptionLanguagePostRequest {
id: number;
language: LanguageEnum;
trackTranslationTranscriptionSegment: Array<TrackTranslationTranscriptionSegment>;
transcriptionSegment: Array<TranscriptionSegment>;
}

/**
Expand Down Expand Up @@ -182,7 +182,7 @@ export class TrackApi extends runtime.BaseAPI {

/**
*/
async trackIdTranscriptionGetRaw(requestParameters: TrackIdTranscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrackTranslationTranscriptionSegment>>> {
async trackIdTranscriptionGetRaw(requestParameters: TrackIdTranscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TranscriptionSegment>>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling trackIdTranscriptionGet.');
}
Expand All @@ -202,19 +202,19 @@ export class TrackApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrackTranslationTranscriptionSegmentFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TranscriptionSegmentFromJSON));
}

/**
*/
async trackIdTranscriptionGet(requestParameters: TrackIdTranscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrackTranslationTranscriptionSegment>> {
async trackIdTranscriptionGet(requestParameters: TrackIdTranscriptionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TranscriptionSegment>> {
const response = await this.trackIdTranscriptionGetRaw(requestParameters, initOverrides);
return await response.value();
}

/**
*/
async trackIdTranscriptionLanguageGetRaw(requestParameters: TrackIdTranscriptionLanguageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrackTranslationTranscriptionSegment>>> {
async trackIdTranscriptionLanguageGetRaw(requestParameters: TrackIdTranscriptionLanguageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TranscriptionSegment>>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling trackIdTranscriptionLanguageGet.');
}
Expand All @@ -238,12 +238,12 @@ export class TrackApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrackTranslationTranscriptionSegmentFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TranscriptionSegmentFromJSON));
}

/**
*/
async trackIdTranscriptionLanguageGet(requestParameters: TrackIdTranscriptionLanguageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrackTranslationTranscriptionSegment>> {
async trackIdTranscriptionLanguageGet(requestParameters: TrackIdTranscriptionLanguageGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TranscriptionSegment>> {
const response = await this.trackIdTranscriptionLanguageGetRaw(requestParameters, initOverrides);
return await response.value();
}
Expand All @@ -259,8 +259,8 @@ export class TrackApi extends runtime.BaseAPI {
throw new runtime.RequiredError('language','Required parameter requestParameters.language was null or undefined when calling trackIdTranscriptionLanguagePost.');
}

if (requestParameters.trackTranslationTranscriptionSegment === null || requestParameters.trackTranslationTranscriptionSegment === undefined) {
throw new runtime.RequiredError('trackTranslationTranscriptionSegment','Required parameter requestParameters.trackTranslationTranscriptionSegment was null or undefined when calling trackIdTranscriptionLanguagePost.');
if (requestParameters.transcriptionSegment === null || requestParameters.transcriptionSegment === undefined) {
throw new runtime.RequiredError('transcriptionSegment','Required parameter requestParameters.transcriptionSegment was null or undefined when calling trackIdTranscriptionLanguagePost.');
}

const queryParameters: any = {};
Expand All @@ -274,7 +274,7 @@ export class TrackApi extends runtime.BaseAPI {
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.trackTranslationTranscriptionSegment.map(TrackTranslationTranscriptionSegmentToJSON),
body: requestParameters.transcriptionSegment.map(TranscriptionSegmentToJSON),
}, initOverrides);

return new runtime.VoidApiResponse(response);
Expand Down
12 changes: 6 additions & 6 deletions src/apis/TranscriptionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import * as runtime from '../runtime';
import type {
LanguageEnum,
StoreTranscriptionEditSuggestionsSuggestion,
TrackTranslationTranscriptionSegment,
TranscriptionSegment,
} from '../models/index';
import {
LanguageEnumFromJSON,
LanguageEnumToJSON,
StoreTranscriptionEditSuggestionsSuggestionFromJSON,
StoreTranscriptionEditSuggestionsSuggestionToJSON,
TrackTranslationTranscriptionSegmentFromJSON,
TrackTranslationTranscriptionSegmentToJSON,
TranscriptionSegmentFromJSON,
TranscriptionSegmentToJSON,
} from '../models/index';

export interface TranscriptionTrackIdLanguageFirstLastGetRequest {
Expand All @@ -48,7 +48,7 @@ export class TranscriptionApi extends runtime.BaseAPI {

/**
*/
async transcriptionTrackIdLanguageFirstLastGetRaw(requestParameters: TranscriptionTrackIdLanguageFirstLastGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrackTranslationTranscriptionSegment>>> {
async transcriptionTrackIdLanguageFirstLastGetRaw(requestParameters: TranscriptionTrackIdLanguageFirstLastGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TranscriptionSegment>>> {
if (requestParameters.trackId === null || requestParameters.trackId === undefined) {
throw new runtime.RequiredError('trackId','Required parameter requestParameters.trackId was null or undefined when calling transcriptionTrackIdLanguageFirstLastGet.');
}
Expand Down Expand Up @@ -76,12 +76,12 @@ export class TranscriptionApi extends runtime.BaseAPI {
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrackTranslationTranscriptionSegmentFromJSON));
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TranscriptionSegmentFromJSON));
}

/**
*/
async transcriptionTrackIdLanguageFirstLastGet(requestParameters: TranscriptionTrackIdLanguageFirstLastGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrackTranslationTranscriptionSegment>> {
async transcriptionTrackIdLanguageFirstLastGet(requestParameters: TranscriptionTrackIdLanguageFirstLastGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TranscriptionSegment>> {
const response = await this.transcriptionTrackIdLanguageFirstLastGetRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down
16 changes: 16 additions & 0 deletions src/models/Lyrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,24 @@ export interface Lyrics {
* @memberof Lyrics
*/
longCopyright?: string | null;
/**
*
* @type {number}
* @memberof Lyrics
*/
yearPublished?: number | null;
/**
*
* @type {Array<LyricsVerse>}
* @memberof Lyrics
*/
verses?: Array<LyricsVerse> | null;
/**
*
* @type {string}
* @memberof Lyrics
*/
originalUrl?: string | null;
/**
*
* @type {string}
Expand Down Expand Up @@ -127,7 +139,9 @@ export function LyricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ly
'composers': !exists(json, 'composers') ? undefined : json['composers'],
'shortCopyright': !exists(json, 'short_copyright') ? undefined : json['short_copyright'],
'longCopyright': !exists(json, 'long_copyright') ? undefined : json['long_copyright'],
'yearPublished': !exists(json, 'year_published') ? undefined : json['year_published'],
'verses': !exists(json, 'verses') ? undefined : (json['verses'] === null ? null : (json['verses'] as Array<any>).map(LyricsVerseFromJSON)),
'originalUrl': !exists(json, 'original_url') ? undefined : json['original_url'],
'modifiedBy': !exists(json, 'modified_by') ? undefined : json['modified_by'],
'modifiedAt': !exists(json, 'modified_at') ? undefined : (new Date(json['modified_at'])),
};
Expand All @@ -149,7 +163,9 @@ export function LyricsToJSON(value?: Lyrics | null): any {
'composers': value.composers,
'short_copyright': value.shortCopyright,
'long_copyright': value.longCopyright,
'year_published': value.yearPublished,
'verses': value.verses === undefined ? undefined : (value.verses === null ? null : (value.verses as Array<any>).map(LyricsVerseToJSON)),
'original_url': value.originalUrl,
'modified_by': value.modifiedBy,
'modified_at': value.modifiedAt === undefined ? undefined : (value.modifiedAt.toISOString()),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,55 @@ import { exists, mapValues } from '../runtime';
/**
*
* @export
* @interface TrackTranslationTranscriptionSegment
* @interface TranscriptionSegment
*/
export interface TrackTranslationTranscriptionSegment {
export interface TranscriptionSegment {
/**
*
* @type {number}
* @memberof TrackTranslationTranscriptionSegment
* @memberof TranscriptionSegment
*/
id?: number;
/**
*
* @type {number}
* @memberof TrackTranslationTranscriptionSegment
* @memberof TranscriptionSegment
*/
start?: number;
/**
*
* @type {number}
* @memberof TrackTranslationTranscriptionSegment
* @memberof TranscriptionSegment
*/
end?: number;
/**
*
* @type {string}
* @memberof TrackTranslationTranscriptionSegment
* @memberof TranscriptionSegment
*/
text?: string | null;
/**
*
* @type {boolean}
* @memberof TranscriptionSegment
*/
isHeader?: boolean;
}

/**
* Check if a given object implements the TrackTranslationTranscriptionSegment interface.
* Check if a given object implements the TranscriptionSegment interface.
*/
export function instanceOfTrackTranslationTranscriptionSegment(value: object): boolean {
export function instanceOfTranscriptionSegment(value: object): boolean {
let isInstance = true;

return isInstance;
}

export function TrackTranslationTranscriptionSegmentFromJSON(json: any): TrackTranslationTranscriptionSegment {
return TrackTranslationTranscriptionSegmentFromJSONTyped(json, false);
export function TranscriptionSegmentFromJSON(json: any): TranscriptionSegment {
return TranscriptionSegmentFromJSONTyped(json, false);
}

export function TrackTranslationTranscriptionSegmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrackTranslationTranscriptionSegment {
export function TranscriptionSegmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): TranscriptionSegment {
if ((json === undefined) || (json === null)) {
return json;
}
Expand All @@ -68,10 +74,11 @@ export function TrackTranslationTranscriptionSegmentFromJSONTyped(json: any, ign
'start': !exists(json, 'start') ? undefined : json['start'],
'end': !exists(json, 'end') ? undefined : json['end'],
'text': !exists(json, 'text') ? undefined : json['text'],
'isHeader': !exists(json, 'is_header') ? undefined : json['is_header'],
};
}

export function TrackTranslationTranscriptionSegmentToJSON(value?: TrackTranslationTranscriptionSegment | null): any {
export function TranscriptionSegmentToJSON(value?: TranscriptionSegment | null): any {
if (value === undefined) {
return undefined;
}
Expand All @@ -84,6 +91,7 @@ export function TrackTranslationTranscriptionSegmentToJSON(value?: TrackTranslat
'start': value.start,
'end': value.end,
'text': value.text,
'is_header': value.isHeader,
};
}

3 changes: 2 additions & 1 deletion src/models/TranscriptionTranscriptionSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
export const TranscriptionTranscriptionSource = {
Mediabanken: 'Mediabanken',
SongTreasures: 'SongTreasures',
Manual: 'Manual'
Manual: 'Manual',
Telegraph: 'Telegraph'
} as const;
export type TranscriptionTranscriptionSource = typeof TranscriptionTranscriptionSource[keyof typeof TranscriptionTranscriptionSource];

Expand Down
2 changes: 1 addition & 1 deletion src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export * from './TrackModelTrackContributorType';
export * from './TrackModelTrackMeta';
export * from './TrackReference';
export * from './TrackSubtype';
export * from './TrackTranslationTranscriptionSegment';
export * from './TranscriptionSegment';
export * from './TranscriptionTranscriptionSource';
export * from './UpdateTrackCollectionCommand';
export * from './UserModel';
Expand Down

0 comments on commit 3cb9890

Please sign in to comment.