fix field defs for both CreateStorageData object and CreateStorageDataAttributes object (#43890)

This commit is contained in:
Eason Kang 2020-04-16 07:20:01 +08:00 committed by GitHub
parent 8987bbd357
commit 1186f63e5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -286,8 +286,27 @@ projectsApi.getProject('', '', authClientTwoLegged, authToken);
projectsApi.getProjectHub('', '', authClientTwoLegged, authToken);
// $ExpectType Promise<ApiResponse>
projectsApi.getProjectTopFolders('', '', authClientTwoLegged, authToken);
// $ExpectType Promise<ApiResponse>
projectsApi.postStorage('', {}, authClientTwoLegged, authToken);
projectsApi.postStorage('', {
jsonapi: {
version: '1.0'
},
data: {
type: 'objects',
attributes: {
name: '{{Filename}}'
},
relationships: {
target: {
data: {
type: 'folders',
id: '{{FolderId}}'
}
}
}
}
}, authClientTwoLegged, authToken);
// $ExpectType UserProfileApi
const userProfileApi = new UserProfileApi();

View File

@ -723,7 +723,7 @@ export class HubsApi {
export interface CreateStorageDataAttributes {
name: string;
extension: BaseAttributesExtensionObject;
extension?: BaseAttributesExtensionObject;
}
export interface CreateItemDataRelationshipsTipData {
@ -1047,6 +1047,7 @@ export interface CreateStorageDataRelationships {
}
export interface CreateStorageData {
type: string;
attributes?: CreateStorageDataAttributes;
relationships?: CreateStorageDataRelationships;
}