@bradtech/types
v1.0.1
Published
Shared types package for Brad apps
Downloads
6
Readme
Brad Technology / Types
Shared types package for Brad apps
Usage
import {
User,
Payload,
Auth,
Location,
Subscription,
Reference,
} from "@bradtech/types";
const fakePayload: Payload<void> = {
status: 200,
message: "ok",
};
const fakeUser: User = {
uid: "6R789IOHJ",
email: "[email protected]",
firstname: "Max",
lastname: "Ime",
};
const fakeAuth: Auth = {
uid: "localId",
idToken: "idToken",
refreshToken: "refreshToken",
expiresIn: 3600,
};
const fakeSub: Subscription = {
id: "12345",
createdAt: 23456789,
startAt: 23456789,
endAt: 23456789,
status: "actif",
name: "random name",
company: {
ref: "company/fdsdfs",
label: "label",
},
};
const fakeLoc: Location = {
id: "123",
position: [43.555806808, 4.4918886346],
startAt: 123435232,
status: "actif",
};
const fakeRef: Reference = {
ref: "company/fdsdfs",
label: "label",
};
Test
yarn test