Start work on copying API types to the frontend
This commit is contained in:
parent
9d28b20fe0
commit
7591c8ad64
17 changed files with 133 additions and 8 deletions
3
frontend-reactive/app/models/account.js
Normal file
3
frontend-reactive/app/models/account.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class AccountModel extends Model {}
|
3
frontend-reactive/app/models/custom-account-field.js
Normal file
3
frontend-reactive/app/models/custom-account-field.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class CustomAccountFieldModel extends Model {}
|
3
frontend-reactive/app/models/emote.js
Normal file
3
frontend-reactive/app/models/emote.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class EmoteModel extends Model {}
|
3
frontend-reactive/app/models/media-metadata.js
Normal file
3
frontend-reactive/app/models/media-metadata.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class MediaMetadataModel extends Model {}
|
3
frontend-reactive/app/models/note.js
Normal file
3
frontend-reactive/app/models/note.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class NoteModel extends Model {}
|
3
frontend-reactive/app/models/reaction.js
Normal file
3
frontend-reactive/app/models/reaction.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class ReactionModel extends Model {}
|
3
frontend-reactive/app/models/relation.js
Normal file
3
frontend-reactive/app/models/relation.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import Model from '@ember-data/model';
|
||||||
|
|
||||||
|
export default class RelationModel extends Model {}
|
|
@ -1,8 +0,0 @@
|
||||||
import Model, { attr } from '@ember-data/model';
|
|
||||||
|
|
||||||
export default class RemoteServerModel extends Model {
|
|
||||||
@attr('string') serverType;
|
|
||||||
@attr('string') name;
|
|
||||||
@attr('string') iconUrl;
|
|
||||||
@attr('boolean') isSelf;
|
|
||||||
}
|
|
8
frontend-reactive/app/models/remote-server.ts
Normal file
8
frontend-reactive/app/models/remote-server.ts
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import Model, { attr } from '@ember-data/model'
|
||||||
|
|
||||||
|
export default class RemoteServerModel extends Model {
|
||||||
|
@attr() declare serverType: string
|
||||||
|
@attr() declare name: string
|
||||||
|
@attr() declare iconUrl: string
|
||||||
|
@attr() declare isSelf: boolean
|
||||||
|
}
|
13
frontend-reactive/tests/unit/models/account-test.js
Normal file
13
frontend-reactive/tests/unit/models/account-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | account', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('account', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | custom account field', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('custom-account-field', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/emote-test.js
Normal file
13
frontend-reactive/tests/unit/models/emote-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | emote', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('emote', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/media-metadata-test.js
Normal file
13
frontend-reactive/tests/unit/models/media-metadata-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | media metadata', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('media-metadata', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/note-test.js
Normal file
13
frontend-reactive/tests/unit/models/note-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | note', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('note', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/reaction-test.js
Normal file
13
frontend-reactive/tests/unit/models/reaction-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | reaction', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('reaction', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/relation-test.js
Normal file
13
frontend-reactive/tests/unit/models/relation-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | relation', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('relation', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
13
frontend-reactive/tests/unit/models/role-test.js
Normal file
13
frontend-reactive/tests/unit/models/role-test.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { setupTest } from 'frontend-reactive/tests/helpers';
|
||||||
|
import { module, test } from 'qunit';
|
||||||
|
|
||||||
|
module('Unit | Model | role', function (hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
// Replace this with your real tests.
|
||||||
|
test('it exists', function (assert) {
|
||||||
|
const store = this.owner.lookup('service:store');
|
||||||
|
const model = store.createRecord('role', {});
|
||||||
|
assert.ok(model, 'model exists');
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in a new issue