-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
502 changed files
with
10,632 additions
and
5,464 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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class Citation extends OsfAdapter { | ||
export default class CitationAdapter extends OsfAdapter { | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'citation': Citation; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
citation: CitationAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class CollectionProvider extends OsfAdapter { | ||
export default class CollectionProviderAdapter extends OsfAdapter { | ||
pathForType(_: string): string { | ||
return 'providers/collections'; | ||
} | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'collection-provider': CollectionProvider; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'collection-provider': CollectionProviderAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,30 +1,29 @@ | ||
import DS from 'ember-data'; | ||
|
||
import OsfAdapter from './osf-adapter'; | ||
|
||
const requestTypes = ['createRecord', 'updateRecord', 'deleteRecord']; | ||
|
||
export default class Collection extends OsfAdapter.extend({ | ||
export default class CollectionAdapter extends OsfAdapter { | ||
buildURL( | ||
this: Collection, | ||
modelName: 'collection', | ||
id: string, | ||
snapshot: DS.Snapshot, | ||
requestType: string, | ||
): string { | ||
) { | ||
// Embed linked_nodes | ||
const base: string = this._super(modelName, id, snapshot, requestType); | ||
const base = super.buildURL(modelName, id, snapshot, requestType); | ||
|
||
if (requestTypes.includes(requestType)) { | ||
return base; | ||
} | ||
|
||
return `${base}?embed=linked_nodes`; | ||
}, | ||
}) { | ||
} | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'collection': Collection; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
collection: CollectionAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class CommentReport extends OsfAdapter { | ||
export default class CommentReportAdapter extends OsfAdapter { | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'comment-report': CommentReport; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'comment-report': CommentReportAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class Comment extends OsfAdapter { | ||
export default class CommentAdapter extends OsfAdapter { | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'comment': Comment; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
comment: CommentAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import DS from 'ember-data'; | ||
|
||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class DraftRegistration extends OsfAdapter { | ||
urlForCreateRecord(_: string, snapshot: DS.Snapshot) { | ||
return snapshot.record.belongsTo('branchedFrom').value() | ||
.links.relationships.draft_registrations.links.related.href; | ||
} | ||
export default class DraftRegistrationAdapter extends OsfAdapter { | ||
parentRelationship = 'branchedFrom'; | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'draft-registration': DraftRegistration; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'draft-registration': DraftRegistrationAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class FileContents extends OsfAdapter { | ||
export default class FileContentsAdapter extends OsfAdapter { | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'file-contents': FileContents; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'file-contents': FileContentsAdapter; | ||
} // eslint-disable-line semi | ||
} |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class FileProvider extends OsfAdapter { | ||
export default class FileProviderAdapter extends OsfAdapter { | ||
pathForType(_: string): string { | ||
return 'files'; | ||
} | ||
} | ||
|
||
declare module 'ember-data' { | ||
interface AdapterRegistry { | ||
'file-provider': FileProvider; | ||
} | ||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'file-provider': FileProviderAdapter; | ||
} // eslint-disable-line semi | ||
} |
Oops, something went wrong.