Start work on copying API types to the frontend

This commit is contained in:
Melody Becker 2024-11-20 13:39:34 +01:00
parent 9d28b20fe0
commit 7591c8ad64
17 changed files with 133 additions and 8 deletions

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class AccountModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class CustomAccountFieldModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class EmoteModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class MediaMetadataModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class NoteModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class ReactionModel extends Model {}

View file

@ -0,0 +1,3 @@
import Model from '@ember-data/model';
export default class RelationModel extends Model {}

View file

@ -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;
}

View 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
}

View 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');
});
});

View file

@ -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');
});
});

View 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');
});
});

View 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');
});
});

View 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');
});
});

View 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');
});
});

View 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');
});
});

View 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');
});
});