357 lines
11 KiB
TypeScript
357 lines
11 KiB
TypeScript
import { ConnectorConfig, DataConnect, QueryRef, QueryPromise, MutationRef, MutationPromise } from 'firebase/data-connect';
|
|
|
|
export const connectorConfig: ConnectorConfig;
|
|
|
|
export type TimestampString = string;
|
|
export type UUIDString = string;
|
|
export type Int64String = string;
|
|
export type DateString = string;
|
|
|
|
|
|
export enum BackgroundCheckStatus {
|
|
PENDING = "PENDING",
|
|
CLEARED = "CLEARED",
|
|
FAILED = "FAILED",
|
|
EXPIRED = "EXPIRED",
|
|
};
|
|
|
|
export enum EmploymentType {
|
|
FULL_TIME = "FULL_TIME",
|
|
PART_TIME = "PART_TIME",
|
|
ON_CALL = "ON_CALL",
|
|
CONTRACT = "CONTRACT",
|
|
};
|
|
|
|
export enum EventStatus {
|
|
DRAFT = "DRAFT",
|
|
ACTIVE = "ACTIVE",
|
|
PENDING = "PENDING",
|
|
ASSIGNED = "ASSIGNED",
|
|
CONFIRMED = "CONFIRMED",
|
|
COMPLETED = "COMPLETED",
|
|
CANCELED = "CANCELED",
|
|
};
|
|
|
|
export enum RecurrenceType {
|
|
SINGLE = "SINGLE",
|
|
DATE_RANGE = "DATE_RANGE",
|
|
SCATTER = "SCATTER",
|
|
};
|
|
|
|
export enum VendorApprovalStatus {
|
|
PENDING = "PENDING",
|
|
APPROVED = "APPROVED",
|
|
SUSPENDED = "SUSPENDED",
|
|
TERMINATED = "TERMINATED",
|
|
};
|
|
|
|
export enum VendorPlatformType {
|
|
FULL_PLATFORM = "FULL_PLATFORM",
|
|
BUILDING_PLATFORM = "BUILDING_PLATFORM",
|
|
PARTIAL_TECH = "PARTIAL_TECH",
|
|
TRADITIONAL = "TRADITIONAL",
|
|
};
|
|
|
|
export enum VendorRegion {
|
|
NATIONAL = "NATIONAL",
|
|
BAY_AREA = "BAY_AREA",
|
|
SOUTHERN_CALIFORNIA = "SOUTHERN_CALIFORNIA",
|
|
NORTHERN_CALIFORNIA = "NORTHERN_CALIFORNIA",
|
|
WEST = "WEST",
|
|
EAST = "EAST",
|
|
MIDWEST = "MIDWEST",
|
|
SOUTH = "SOUTH",
|
|
};
|
|
|
|
|
|
|
|
export interface CreateEventData {
|
|
event_insert: Event_Key;
|
|
}
|
|
|
|
export interface CreateEventVariables {
|
|
eventName: string;
|
|
isRecurring: boolean;
|
|
recurrenceType?: RecurrenceType | null;
|
|
businessId: UUIDString;
|
|
vendorId?: UUIDString | null;
|
|
status: EventStatus;
|
|
date: TimestampString;
|
|
shifts?: string | null;
|
|
total?: number | null;
|
|
requested?: number | null;
|
|
assignedStaff?: string | null;
|
|
}
|
|
|
|
export interface CreateStaffData {
|
|
staff_insert: Staff_Key;
|
|
}
|
|
|
|
export interface CreateStaffVariables {
|
|
employeeName: string;
|
|
vendorId?: UUIDString | null;
|
|
email?: string | null;
|
|
position?: string | null;
|
|
employmentType: EmploymentType;
|
|
rating?: number | null;
|
|
reliabilityScore?: number | null;
|
|
backgroundCheckStatus: BackgroundCheckStatus;
|
|
certifications?: string | null;
|
|
}
|
|
|
|
export interface CreateVendorData {
|
|
vendor_insert: Vendor_Key;
|
|
}
|
|
|
|
export interface CreateVendorVariables {
|
|
vendorNumber: string;
|
|
legalName: string;
|
|
region: VendorRegion;
|
|
platformType: VendorPlatformType;
|
|
primaryContactEmail: string;
|
|
approvalStatus: VendorApprovalStatus;
|
|
isActive?: boolean | null;
|
|
}
|
|
|
|
export interface DeleteVendorData {
|
|
vendor_delete?: Vendor_Key | null;
|
|
}
|
|
|
|
export interface DeleteVendorVariables {
|
|
id: UUIDString;
|
|
}
|
|
|
|
export interface Event_Key {
|
|
id: UUIDString;
|
|
__typename?: 'Event_Key';
|
|
}
|
|
|
|
export interface FilterVendorsData {
|
|
vendors: ({
|
|
id: UUIDString;
|
|
vendorNumber: string;
|
|
legalName: string;
|
|
region: VendorRegion;
|
|
platformType: VendorPlatformType;
|
|
primaryContactEmail: string;
|
|
approvalStatus: VendorApprovalStatus;
|
|
isActive?: boolean | null;
|
|
} & Vendor_Key)[];
|
|
}
|
|
|
|
export interface FilterVendorsVariables {
|
|
region?: VendorRegion | null;
|
|
approvalStatus?: VendorApprovalStatus | null;
|
|
isActive?: boolean | null;
|
|
vendorNumber?: string | null;
|
|
primaryContactEmail?: string | null;
|
|
legalName?: string | null;
|
|
platformType?: VendorPlatformType | null;
|
|
}
|
|
|
|
export interface GetVendorByIdData {
|
|
vendor?: {
|
|
id: UUIDString;
|
|
vendorNumber: string;
|
|
legalName: string;
|
|
region: VendorRegion;
|
|
platformType: VendorPlatformType;
|
|
primaryContactEmail: string;
|
|
approvalStatus: VendorApprovalStatus;
|
|
isActive?: boolean | null;
|
|
} & Vendor_Key;
|
|
}
|
|
|
|
export interface GetVendorByIdVariables {
|
|
id: UUIDString;
|
|
}
|
|
|
|
export interface ListEventsData {
|
|
events: ({
|
|
id: UUIDString;
|
|
eventName: string;
|
|
status: EventStatus;
|
|
date: TimestampString;
|
|
isRecurring: boolean;
|
|
recurrenceType?: RecurrenceType | null;
|
|
businessId: UUIDString;
|
|
vendorId?: UUIDString | null;
|
|
total?: number | null;
|
|
requested?: number | null;
|
|
} & Event_Key)[];
|
|
}
|
|
|
|
export interface ListStaffData {
|
|
staffs: ({
|
|
id: UUIDString;
|
|
employeeName: string;
|
|
vendorId?: UUIDString | null;
|
|
email?: string | null;
|
|
position?: string | null;
|
|
employmentType: EmploymentType;
|
|
rating?: number | null;
|
|
reliabilityScore?: number | null;
|
|
backgroundCheckStatus: BackgroundCheckStatus;
|
|
certifications?: string | null;
|
|
} & Staff_Key)[];
|
|
}
|
|
|
|
export interface ListVendorData {
|
|
vendors: ({
|
|
id: UUIDString;
|
|
vendorNumber: string;
|
|
legalName: string;
|
|
region: VendorRegion;
|
|
platformType: VendorPlatformType;
|
|
primaryContactEmail: string;
|
|
approvalStatus: VendorApprovalStatus;
|
|
isActive?: boolean | null;
|
|
} & Vendor_Key)[];
|
|
}
|
|
|
|
export interface Staff_Key {
|
|
id: UUIDString;
|
|
__typename?: 'Staff_Key';
|
|
}
|
|
|
|
export interface UpdateVendorData {
|
|
vendor_update?: Vendor_Key | null;
|
|
}
|
|
|
|
export interface UpdateVendorVariables {
|
|
id: UUIDString;
|
|
vendorNumber?: string | null;
|
|
legalName?: string | null;
|
|
region?: VendorRegion | null;
|
|
platformType?: VendorPlatformType | null;
|
|
primaryContactEmail?: string | null;
|
|
approvalStatus?: VendorApprovalStatus | null;
|
|
isActive?: boolean | null;
|
|
}
|
|
|
|
export interface Vendor_Key {
|
|
id: UUIDString;
|
|
__typename?: 'Vendor_Key';
|
|
}
|
|
|
|
interface ListEventsRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(): QueryRef<ListEventsData, undefined>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect): QueryRef<ListEventsData, undefined>;
|
|
operationName: string;
|
|
}
|
|
export const listEventsRef: ListEventsRef;
|
|
|
|
export function listEvents(): QueryPromise<ListEventsData, undefined>;
|
|
export function listEvents(dc: DataConnect): QueryPromise<ListEventsData, undefined>;
|
|
|
|
interface CreateStaffRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: CreateStaffVariables): MutationRef<CreateStaffData, CreateStaffVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: CreateStaffVariables): MutationRef<CreateStaffData, CreateStaffVariables>;
|
|
operationName: string;
|
|
}
|
|
export const createStaffRef: CreateStaffRef;
|
|
|
|
export function createStaff(vars: CreateStaffVariables): MutationPromise<CreateStaffData, CreateStaffVariables>;
|
|
export function createStaff(dc: DataConnect, vars: CreateStaffVariables): MutationPromise<CreateStaffData, CreateStaffVariables>;
|
|
|
|
interface ListStaffRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(): QueryRef<ListStaffData, undefined>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect): QueryRef<ListStaffData, undefined>;
|
|
operationName: string;
|
|
}
|
|
export const listStaffRef: ListStaffRef;
|
|
|
|
export function listStaff(): QueryPromise<ListStaffData, undefined>;
|
|
export function listStaff(dc: DataConnect): QueryPromise<ListStaffData, undefined>;
|
|
|
|
interface CreateVendorRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: CreateVendorVariables): MutationRef<CreateVendorData, CreateVendorVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: CreateVendorVariables): MutationRef<CreateVendorData, CreateVendorVariables>;
|
|
operationName: string;
|
|
}
|
|
export const createVendorRef: CreateVendorRef;
|
|
|
|
export function createVendor(vars: CreateVendorVariables): MutationPromise<CreateVendorData, CreateVendorVariables>;
|
|
export function createVendor(dc: DataConnect, vars: CreateVendorVariables): MutationPromise<CreateVendorData, CreateVendorVariables>;
|
|
|
|
interface UpdateVendorRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: UpdateVendorVariables): MutationRef<UpdateVendorData, UpdateVendorVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: UpdateVendorVariables): MutationRef<UpdateVendorData, UpdateVendorVariables>;
|
|
operationName: string;
|
|
}
|
|
export const updateVendorRef: UpdateVendorRef;
|
|
|
|
export function updateVendor(vars: UpdateVendorVariables): MutationPromise<UpdateVendorData, UpdateVendorVariables>;
|
|
export function updateVendor(dc: DataConnect, vars: UpdateVendorVariables): MutationPromise<UpdateVendorData, UpdateVendorVariables>;
|
|
|
|
interface DeleteVendorRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: DeleteVendorVariables): MutationRef<DeleteVendorData, DeleteVendorVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: DeleteVendorVariables): MutationRef<DeleteVendorData, DeleteVendorVariables>;
|
|
operationName: string;
|
|
}
|
|
export const deleteVendorRef: DeleteVendorRef;
|
|
|
|
export function deleteVendor(vars: DeleteVendorVariables): MutationPromise<DeleteVendorData, DeleteVendorVariables>;
|
|
export function deleteVendor(dc: DataConnect, vars: DeleteVendorVariables): MutationPromise<DeleteVendorData, DeleteVendorVariables>;
|
|
|
|
interface ListVendorRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(): QueryRef<ListVendorData, undefined>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect): QueryRef<ListVendorData, undefined>;
|
|
operationName: string;
|
|
}
|
|
export const listVendorRef: ListVendorRef;
|
|
|
|
export function listVendor(): QueryPromise<ListVendorData, undefined>;
|
|
export function listVendor(dc: DataConnect): QueryPromise<ListVendorData, undefined>;
|
|
|
|
interface GetVendorByIdRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: GetVendorByIdVariables): QueryRef<GetVendorByIdData, GetVendorByIdVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: GetVendorByIdVariables): QueryRef<GetVendorByIdData, GetVendorByIdVariables>;
|
|
operationName: string;
|
|
}
|
|
export const getVendorByIdRef: GetVendorByIdRef;
|
|
|
|
export function getVendorById(vars: GetVendorByIdVariables): QueryPromise<GetVendorByIdData, GetVendorByIdVariables>;
|
|
export function getVendorById(dc: DataConnect, vars: GetVendorByIdVariables): QueryPromise<GetVendorByIdData, GetVendorByIdVariables>;
|
|
|
|
interface FilterVendorsRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars?: FilterVendorsVariables): QueryRef<FilterVendorsData, FilterVendorsVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars?: FilterVendorsVariables): QueryRef<FilterVendorsData, FilterVendorsVariables>;
|
|
operationName: string;
|
|
}
|
|
export const filterVendorsRef: FilterVendorsRef;
|
|
|
|
export function filterVendors(vars?: FilterVendorsVariables): QueryPromise<FilterVendorsData, FilterVendorsVariables>;
|
|
export function filterVendors(dc: DataConnect, vars?: FilterVendorsVariables): QueryPromise<FilterVendorsData, FilterVendorsVariables>;
|
|
|
|
interface CreateEventRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: CreateEventVariables): MutationRef<CreateEventData, CreateEventVariables>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: CreateEventVariables): MutationRef<CreateEventData, CreateEventVariables>;
|
|
operationName: string;
|
|
}
|
|
export const createEventRef: CreateEventRef;
|
|
|
|
export function createEvent(vars: CreateEventVariables): MutationPromise<CreateEventData, CreateEventVariables>;
|
|
export function createEvent(dc: DataConnect, vars: CreateEventVariables): MutationPromise<CreateEventData, CreateEventVariables>;
|
|
|