-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: serialize basic document data in /me/visa responses (#769)
* MINOR: serialize basic document data in /me/visa responses * fix minor mistakes * fix parent_id in doc * fix prefetch
- Loading branch information
1 parent
0c16ab6
commit 54c8f6d
Showing
6 changed files
with
284 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* BIMData API | ||
* BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints. | ||
* | ||
* The version of the OpenAPI document: v1 (v1) | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { exists, mapValues } from '../runtime'; | ||
/** | ||
* | ||
* @export | ||
* @interface LightDocument | ||
*/ | ||
export interface LightDocument { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof LightDocument | ||
*/ | ||
readonly id: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof LightDocument | ||
*/ | ||
readonly parent_id: number; | ||
/** | ||
* Shown name of the file | ||
* @type {string} | ||
* @memberof LightDocument | ||
*/ | ||
readonly name: string; | ||
/** | ||
* Description of the file | ||
* @type {string} | ||
* @memberof LightDocument | ||
*/ | ||
readonly description: string | null; | ||
/** | ||
* Document id of head version | ||
* @type {number} | ||
* @memberof LightDocument | ||
*/ | ||
readonly head_id: number | null; | ||
/** | ||
* Document is a head of version or is owned by another document | ||
* @type {boolean} | ||
* @memberof LightDocument | ||
*/ | ||
readonly is_head_version: boolean; | ||
} | ||
|
||
export function LightDocumentFromJSON(json: any): LightDocument { | ||
return LightDocumentFromJSONTyped(json, false); | ||
} | ||
|
||
export function LightDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): LightDocument { | ||
if ((json === undefined) || (json === null)) { | ||
return json; | ||
} | ||
return { | ||
|
||
'id': json['id'], | ||
'parent_id': json['parent_id'], | ||
'name': json['name'], | ||
'description': json['description'], | ||
'head_id': json['head_id'], | ||
'is_head_version': json['is_head_version'], | ||
}; | ||
} | ||
|
||
export function LightDocumentToJSON(value?: LightDocument | null): any { | ||
if (value === undefined) { | ||
return undefined; | ||
} | ||
if (value === null) { | ||
return null; | ||
} | ||
return { | ||
|
||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* BIMData API | ||
* BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints. | ||
* | ||
* The version of the OpenAPI document: v1 (v1) | ||
* Contact: [email protected] | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { exists, mapValues } from '../runtime'; | ||
import { | ||
LightDocument, | ||
LightDocumentFromJSON, | ||
LightDocumentFromJSONTyped, | ||
LightDocumentToJSON, | ||
} from './LightDocument'; | ||
import { | ||
UserProject, | ||
UserProjectFromJSON, | ||
UserProjectFromJSONTyped, | ||
UserProjectToJSON, | ||
} from './UserProject'; | ||
import { | ||
VisaComment, | ||
VisaCommentFromJSON, | ||
VisaCommentFromJSONTyped, | ||
VisaCommentToJSON, | ||
} from './VisaComment'; | ||
import { | ||
VisaValidation, | ||
VisaValidationFromJSON, | ||
VisaValidationFromJSONTyped, | ||
VisaValidationToJSON, | ||
} from './VisaValidation'; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface VisaWithDocument | ||
*/ | ||
export interface VisaWithDocument { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly id: number; | ||
/** | ||
* | ||
* @type {Array<VisaValidation>} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly validations: Array<VisaValidation>; | ||
/** | ||
* Validation IDs where one or more validators have no longer access to the visa document. | ||
* @type {Array<number>} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly validations_in_error: Array<number>; | ||
/** | ||
* | ||
* @type {UserProject} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly creator: UserProject | null; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly document_id: number; | ||
/** | ||
* * `O` - opened | ||
* * `P` - paused | ||
* * `C` - closed | ||
* @type {string} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly status: VisaWithDocumentStatusEnum; | ||
/** | ||
* Description of the visa | ||
* @type {string} | ||
* @memberof VisaWithDocument | ||
*/ | ||
description?: string | null; | ||
/** | ||
* | ||
* @type {Array<VisaComment>} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly comments: Array<VisaComment>; | ||
/** | ||
* | ||
* @type {Date} | ||
* @memberof VisaWithDocument | ||
*/ | ||
deadline?: Date | null; | ||
/** | ||
* | ||
* @type {Date} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly created_at: Date; | ||
/** | ||
* | ||
* @type {Date} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly updated_at: Date; | ||
/** | ||
* | ||
* @type {LightDocument} | ||
* @memberof VisaWithDocument | ||
*/ | ||
readonly document: LightDocument | null; | ||
} | ||
|
||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum VisaWithDocumentStatusEnum { | ||
O = 'O', | ||
P = 'P', | ||
C = 'C' | ||
} | ||
|
||
export function VisaWithDocumentFromJSON(json: any): VisaWithDocument { | ||
return VisaWithDocumentFromJSONTyped(json, false); | ||
} | ||
|
||
export function VisaWithDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): VisaWithDocument { | ||
if ((json === undefined) || (json === null)) { | ||
return json; | ||
} | ||
return { | ||
|
||
'id': json['id'], | ||
'validations': ((json['validations'] as Array<any>).map(VisaValidationFromJSON)), | ||
'validations_in_error': json['validations_in_error'], | ||
'creator': UserProjectFromJSON(json['creator']), | ||
'document_id': json['document_id'], | ||
'status': json['status'], | ||
'description': !exists(json, 'description') ? undefined : json['description'], | ||
'comments': ((json['comments'] as Array<any>).map(VisaCommentFromJSON)), | ||
'deadline': !exists(json, 'deadline') ? undefined : (json['deadline'] === null ? null : new Date(json['deadline'])), | ||
'created_at': (new Date(json['created_at'])), | ||
'updated_at': (new Date(json['updated_at'])), | ||
'document': LightDocumentFromJSON(json['document']), | ||
}; | ||
} | ||
|
||
export function VisaWithDocumentToJSON(value?: VisaWithDocument | null): any { | ||
if (value === undefined) { | ||
return undefined; | ||
} | ||
if (value === null) { | ||
return null; | ||
} | ||
return { | ||
|
||
'description': value.description, | ||
'deadline': value.deadline === undefined ? undefined : (value.deadline === null ? null : value.deadline.toISOString().substr(0,10)), | ||
}; | ||
} | ||
|
Oops, something went wrong.