Implement pocketbase API
This commit is contained in:
@@ -12,6 +12,7 @@ export enum Collections {
|
||||
Otps = "_otps",
|
||||
Superusers = "_superusers",
|
||||
IndBillitem = "ind_billItem",
|
||||
IndFacility = "ind_facility",
|
||||
IndJob = "ind_job",
|
||||
IndTransaction = "ind_transaction",
|
||||
Regionview = "regionview",
|
||||
@@ -105,6 +106,14 @@ export type IndBillitemRecord = {
|
||||
updated?: IsoDateString
|
||||
}
|
||||
|
||||
export type IndFacilityRecord = {
|
||||
created?: IsoDateString
|
||||
id: string
|
||||
location: string
|
||||
name: string
|
||||
updated?: IsoDateString
|
||||
}
|
||||
|
||||
export enum IndJobStatusOptions {
|
||||
"Planned" = "Planned",
|
||||
"Acquisition" = "Acquisition",
|
||||
@@ -206,6 +215,7 @@ export type MfasResponse<Texpand = unknown> = Required<MfasRecord> & BaseSystemF
|
||||
export type OtpsResponse<Texpand = unknown> = Required<OtpsRecord> & BaseSystemFields<Texpand>
|
||||
export type SuperusersResponse<Texpand = unknown> = Required<SuperusersRecord> & AuthSystemFields<Texpand>
|
||||
export type IndBillitemResponse<Texpand = unknown> = Required<IndBillitemRecord> & BaseSystemFields<Texpand>
|
||||
export type IndFacilityResponse<Texpand = unknown> = Required<IndFacilityRecord> & BaseSystemFields<Texpand>
|
||||
export type IndJobResponse<Texpand = unknown> = Required<IndJobRecord> & BaseSystemFields<Texpand>
|
||||
export type IndTransactionResponse<Texpand = unknown> = Required<IndTransactionRecord> & BaseSystemFields<Texpand>
|
||||
export type RegionviewResponse<Texpand = unknown> = Required<RegionviewRecord> & BaseSystemFields<Texpand>
|
||||
@@ -223,6 +233,7 @@ export type CollectionRecords = {
|
||||
_otps: OtpsRecord
|
||||
_superusers: SuperusersRecord
|
||||
ind_billItem: IndBillitemRecord
|
||||
ind_facility: IndFacilityRecord
|
||||
ind_job: IndJobRecord
|
||||
ind_transaction: IndTransactionRecord
|
||||
regionview: RegionviewRecord
|
||||
@@ -239,6 +250,7 @@ export type CollectionResponses = {
|
||||
_otps: OtpsResponse
|
||||
_superusers: SuperusersResponse
|
||||
ind_billItem: IndBillitemResponse
|
||||
ind_facility: IndFacilityResponse
|
||||
ind_job: IndJobResponse
|
||||
ind_transaction: IndTransactionResponse
|
||||
regionview: RegionviewResponse
|
||||
@@ -258,6 +270,7 @@ export type TypedPocketBase = PocketBase & {
|
||||
collection(idOrName: '_otps'): RecordService<OtpsResponse>
|
||||
collection(idOrName: '_superusers'): RecordService<SuperusersResponse>
|
||||
collection(idOrName: 'ind_billItem'): RecordService<IndBillitemResponse>
|
||||
collection(idOrName: 'ind_facility'): RecordService<IndFacilityResponse>
|
||||
collection(idOrName: 'ind_job'): RecordService<IndJobResponse>
|
||||
collection(idOrName: 'ind_transaction'): RecordService<IndTransactionResponse>
|
||||
collection(idOrName: 'regionview'): RecordService<RegionviewResponse>
|
||||
|
||||
6
src/lib/pocketbase.ts
Normal file
6
src/lib/pocketbase.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
import { TypedPocketBase } from './pbtypes';
|
||||
|
||||
const pb = new PocketBase('https://evebase.site.quack-lab.dev') as TypedPocketBase;
|
||||
|
||||
export default pb;
|
||||
Reference in New Issue
Block a user