const { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } = require('firebase/data-connect');

const BackgroundCheckStatus = {
  PENDING: "PENDING",
  CLEARED: "CLEARED",
  FAILED: "FAILED",
  EXPIRED: "EXPIRED",
}
exports.BackgroundCheckStatus = BackgroundCheckStatus;

const ContractType = {
  W2: "W2",
  C1099: "C1099",
  TEMP: "TEMP",
  CONTRACT: "CONTRACT",
}
exports.ContractType = ContractType;

const EmploymentType = {
  FULL_TIME: "FULL_TIME",
  PART_TIME: "PART_TIME",
  ON_CALL: "ON_CALL",
  CONTRACT: "CONTRACT",
}
exports.EmploymentType = EmploymentType;

const EventStatus = {
  DRAFT: "DRAFT",
  ACTIVE: "ACTIVE",
  PENDING: "PENDING",
  ASSIGNED: "ASSIGNED",
  CONFIRMED: "CONFIRMED",
  COMPLETED: "COMPLETED",
  CANCELED: "CANCELED",
}
exports.EventStatus = EventStatus;

const RecurrenceType = {
  SINGLE: "SINGLE",
  DATE_RANGE: "DATE_RANGE",
  SCATTER: "SCATTER",
}
exports.RecurrenceType = RecurrenceType;

const VendorApprovalStatus = {
  PENDING: "PENDING",
  APPROVED: "APPROVED",
  SUSPENDED: "SUSPENDED",
  TERMINATED: "TERMINATED",
}
exports.VendorApprovalStatus = VendorApprovalStatus;

const VendorPlatformType = {
  FULL_PLATFORM: "FULL_PLATFORM",
  BUILDING_PLATFORM: "BUILDING_PLATFORM",
  PARTIAL_TECH: "PARTIAL_TECH",
  TRADITIONAL: "TRADITIONAL",
}
exports.VendorPlatformType = VendorPlatformType;

const VendorRegion = {
  NATIONAL: "NATIONAL",
  BAY_AREA: "BAY_AREA",
  SOUTHERN_CALIFORNIA: "SOUTHERN_CALIFORNIA",
  NORTHERN_CALIFORNIA: "NORTHERN_CALIFORNIA",
  WEST: "WEST",
  EAST: "EAST",
  MIDWEST: "MIDWEST",
  SOUTH: "SOUTH",
}
exports.VendorRegion = VendorRegion;

const connectorConfig = {
  connector: 'krow-connector',
  service: 'krow-workforce-db',
  location: 'us-central1'
};
exports.connectorConfig = connectorConfig;

const createStaffRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'CreateStaff', inputVars);
}
createStaffRef.operationName = 'CreateStaff';
exports.createStaffRef = createStaffRef;

exports.createStaff = function createStaff(dcOrVars, vars) {
  return executeMutation(createStaffRef(dcOrVars, vars));
};

const listStaffRef = (dc) => {
  const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'listStaff');
}
listStaffRef.operationName = 'listStaff';
exports.listStaffRef = listStaffRef;

exports.listStaff = function listStaff(dc) {
  return executeQuery(listStaffRef(dc));
};

const createVendorRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'CreateVendor', inputVars);
}
createVendorRef.operationName = 'CreateVendor';
exports.createVendorRef = createVendorRef;

exports.createVendor = function createVendor(dcOrVars, vars) {
  return executeMutation(createVendorRef(dcOrVars, vars));
};

const updateVendorRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'UpdateVendor', inputVars);
}
updateVendorRef.operationName = 'UpdateVendor';
exports.updateVendorRef = updateVendorRef;

exports.updateVendor = function updateVendor(dcOrVars, vars) {
  return executeMutation(updateVendorRef(dcOrVars, vars));
};

const deleteVendorRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'DeleteVendor', inputVars);
}
deleteVendorRef.operationName = 'DeleteVendor';
exports.deleteVendorRef = deleteVendorRef;

exports.deleteVendor = function deleteVendor(dcOrVars, vars) {
  return executeMutation(deleteVendorRef(dcOrVars, vars));
};

const listVendorRef = (dc) => {
  const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'listVendor');
}
listVendorRef.operationName = 'listVendor';
exports.listVendorRef = listVendorRef;

exports.listVendor = function listVendor(dc) {
  return executeQuery(listVendorRef(dc));
};

const getVendorByIdRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'getVendorById', inputVars);
}
getVendorByIdRef.operationName = 'getVendorById';
exports.getVendorByIdRef = getVendorByIdRef;

exports.getVendorById = function getVendorById(dcOrVars, vars) {
  return executeQuery(getVendorByIdRef(dcOrVars, vars));
};

const filterVendorsRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'filterVendors', inputVars);
}
filterVendorsRef.operationName = 'filterVendors';
exports.filterVendorsRef = filterVendorsRef;

exports.filterVendors = function filterVendors(dcOrVars, vars) {
  return executeQuery(filterVendorsRef(dcOrVars, vars));
};

const createEventRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'CreateEvent', inputVars);
}
createEventRef.operationName = 'CreateEvent';
exports.createEventRef = createEventRef;

exports.createEvent = function createEvent(dcOrVars, vars) {
  return executeMutation(createEventRef(dcOrVars, vars));
};

const updateEventRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'UpdateEvent', inputVars);
}
updateEventRef.operationName = 'UpdateEvent';
exports.updateEventRef = updateEventRef;

exports.updateEvent = function updateEvent(dcOrVars, vars) {
  return executeMutation(updateEventRef(dcOrVars, vars));
};

const deleteEventRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return mutationRef(dcInstance, 'DeleteEvent', inputVars);
}
deleteEventRef.operationName = 'DeleteEvent';
exports.deleteEventRef = deleteEventRef;

exports.deleteEvent = function deleteEvent(dcOrVars, vars) {
  return executeMutation(deleteEventRef(dcOrVars, vars));
};

const listEventsRef = (dc) => {
  const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'listEvents');
}
listEventsRef.operationName = 'listEvents';
exports.listEventsRef = listEventsRef;

exports.listEvents = function listEvents(dc) {
  return executeQuery(listEventsRef(dc));
};

const getEventByIdRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'getEventById', inputVars);
}
getEventByIdRef.operationName = 'getEventById';
exports.getEventByIdRef = getEventByIdRef;

exports.getEventById = function getEventById(dcOrVars, vars) {
  return executeQuery(getEventByIdRef(dcOrVars, vars));
};

const filterEventsRef = (dcOrVars, vars) => {
  const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars);
  dcInstance._useGeneratedSdk();
  return queryRef(dcInstance, 'filterEvents', inputVars);
}
filterEventsRef.operationName = 'filterEvents';
exports.filterEventsRef = filterEventsRef;

exports.filterEvents = function filterEvents(dcOrVars, vars) {
  return executeQuery(filterEventsRef(dcOrVars, vars));
};
