chore: developer cleanup (#300)

* new PR tasks

* add homebox to know words

* formatting

* bump deps

* generate db models

* ts errors

* drop id

* fix accessor

* drop unused time field

* change CI

* add expected error

* add type check

* resolve serveral type errors

* hoise in CI
This commit is contained in:
Hayden 2023-02-17 21:41:01 -09:00 committed by GitHub
parent 88f9ff90d4
commit bd321af29f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 817 additions and 1200 deletions

View file

@ -9,13 +9,14 @@ import { Requests } from "../../../requests";
function itemField(id = null): ItemField {
return {
// @ts-expect-error
id,
name: faker.lorem.word(),
type: "text",
textValue: faker.lorem.sentence(),
booleanValue: false,
numberValue: faker.datatype.number(),
timeValue: null,
timeValue: "",
};
}
@ -32,8 +33,9 @@ function user(): UserRegistration {
};
}
function location(): LocationCreate {
function location(parentId: string | null = null): LocationCreate {
return {
parentId,
name: faker.address.city(),
description: faker.lorem.sentence(),
};
@ -56,7 +58,7 @@ function publicClient(): PublicApi {
function userClient(token: string): UserClient {
overrideParts(config.BASE_URL, "/api/v1");
const requests = new Requests("", token);
return new UserClient(requests);
return new UserClient(requests, "");
}
type TestUser = {
@ -75,7 +77,7 @@ async function userSingleUse(): Promise<TestUser> {
expect(result.status).toBe(200);
return {
client: new UserClient(new Requests("", result.data.token)),
client: new UserClient(new Requests("", result.data.token), result.data.attachmentToken),
user: usr,
};
}