master: change repo

This commit is contained in:
Julien Calixte
2019-08-22 11:50:32 +02:00
commit dbd63d341c
263 changed files with 26153 additions and 0 deletions

17
src/models/IAccount.ts Normal file
View File

@@ -0,0 +1,17 @@
import IModel from '@/models/IModel'
import IUser from '@/models/IUser'
import ICurrency from '@/models/ICurrency'
export default interface IAccount extends IModel {
name: string
color: string | null
slug?: string
admin: IUser | null
premium?: boolean
users: IUser[]
userIds: string[]
mainCurrency: ICurrency
currencies: ICurrency[]
archive?: boolean
isPublic?: boolean
}

6
src/models/IBalance.ts Normal file
View File

@@ -0,0 +1,6 @@
import IUser from '@/models/IUser'
export default interface IBalance {
user: IUser
amount: number
}

5
src/models/IColor.ts Normal file
View File

@@ -0,0 +1,5 @@
export default interface IColor {
label: string | null
value: string | null
darkValue?: string | null
}

5
src/models/ICurrency.ts Normal file
View File

@@ -0,0 +1,5 @@
export default interface ICurrency {
name: string
code: string
symbol?: string
}

View File

@@ -0,0 +1,4 @@
export default interface IIdPassword {
userId: string
password: string
}

View File

@@ -0,0 +1,6 @@
import IModel from '@/models/IModel'
export default interface IEncryptPassword extends IModel {
password: string
iv?: Uint8Array
}

View File

@@ -0,0 +1,3 @@
export default interface IEncryptable {
[key: string]: any
}

3
src/models/IEncrypted.ts Normal file
View File

@@ -0,0 +1,3 @@
export default interface IEncrypted {
[key: string]: string
}

8
src/models/IExchange.ts Normal file
View File

@@ -0,0 +1,8 @@
import IModel from '@/models/IModel'
export default interface IExchange extends IModel {
base: string
date: string
timestamp?: string
rates: { [k: string]: number }
}

5
src/models/ILocation.ts Normal file
View File

@@ -0,0 +1,5 @@
export default interface ILocation {
lat: number
lon: number
place?: string
}

View File

@@ -0,0 +1,44 @@
export default interface ILocationQuery {
authenticationResultCode: string
brandLogoUri: string
copyright: string
resourceSets: [
{
estimatedTotal: number
resources: [
{
__type: string
bbox: number[]
name: string
point: {
type: string
coordinates: number[]
}
address: {
addressLine: string
adminDistrict: string
adminDistrict2: string
countryRegion: string
formattedAddress: string
locality: string
postalCode: string
}
confidence: string
entityType: string
geocodePoints: [
{
type: string
coordinates: number[]
calculationMethod: string
usageTypes: string[]
}
]
matchCodes: string[]
}
]
}
]
statusCode: number
statusDescription: string
traceId: string
}

7
src/models/IModel.ts Normal file
View File

@@ -0,0 +1,7 @@
export default interface IModel {
_id?: string
_rev?: string
_deleted?: boolean
_conflicts?: string[]
doctype?: string
}

4
src/models/IPoint.ts Normal file
View File

@@ -0,0 +1,4 @@
export default interface IPoint {
x: number
y: number
}

7
src/models/IRefund.ts Normal file
View File

@@ -0,0 +1,7 @@
import IUser from '@/models/IUser'
export default interface IRefund {
from: IUser
to: IUser
amount: number
}

4
src/models/IResponse.ts Normal file
View File

@@ -0,0 +1,4 @@
export default interface IResponse {
ok: boolean
message?: string
}

7
src/models/ISlice.ts Normal file
View File

@@ -0,0 +1,7 @@
export default interface ISlice {
percent: number
color: string
darkColor: string
key?: string
label?: string
}

4
src/models/ISplit.ts Normal file
View File

@@ -0,0 +1,4 @@
export default interface ISplit {
alias: string
weight: number
}

8
src/models/IStat.ts Normal file
View File

@@ -0,0 +1,8 @@
import IBalance from '@/models/IBalance'
export default interface IStat {
label: string
value: number
percent: number
balance: IBalance
}

View File

@@ -0,0 +1,23 @@
import IModel from '@/models/IModel'
import ICurrency from '@/models/ICurrency'
import IExchange from '@/models/IExchange'
import TransactionTag from '@/enums/TransactionTag'
import TransactionType from '@/enums/TransactionType'
import ISplit from '@/models/ISplit'
import ILocation from './ILocation'
export default interface ITransaction extends IModel {
name: string
accountId: string
date: Date
amount: number
payBy: string
payFor: ISplit[]
userIds: string[]
mainCurrency: ICurrency
transactionType: TransactionType
currencies: ICurrency[]
exchange: IExchange | null
tag: TransactionTag
location?: ILocation
}

13
src/models/IUser.ts Normal file
View File

@@ -0,0 +1,13 @@
export default interface IUser {
userId: string
email: string
premium: boolean
slugEmail: string
alias?: string
firstname?: string
lastname?: string
roles?: string[]
customerId?: string
subscriptionId?: string
salt?: string
}

View File

@@ -0,0 +1,7 @@
import IUser from '@/models/IUser'
export default interface IUserPassword {
user: IUser
password: string
replicate?: boolean
}